Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ranges and Attr nodes #607

Open
annevk opened this issue Mar 16, 2018 · 0 comments
Open

Ranges and Attr nodes #607

annevk opened this issue Mar 16, 2018 · 0 comments

Comments

@annevk
Copy link
Member

annevk commented Mar 16, 2018

Looking into #457 for ranges, it seems that ranges can point to Attr nodes in all browsers, but it never seems useful. Is it worth trying to make this throw?

If not, at least as far as ranges are concerned, an attribute's <a for=Node>length</a> is 0, similar to doctypes, meaning the following throws:

.<body x=fd><Script>
r = new Range()
r.setStart(document.body.getAttributeNode("x"), 0);
r.setEnd(document.body.getAttributeNode("x"), 1);
</script>

Whether or not we keep this I guess I should also look at the various other Range members and how they interact with attribute nodes and ensure the test suite covers it.

cc @smaug----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant