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

"The indicated part of the document" should only look for an element in the document tree #1192

Closed
rniwa opened this issue May 4, 2016 · 5 comments
Assignees
Labels
topic: shadow Relates to shadow trees (as defined in DOM)

Comments

@rniwa
Copy link
Collaborator

rniwa commented May 4, 2016

Step 5 of the indicated part of the document is somewhat ambiguous:

If there is an element in the DOM that has an ID exactly equal to decoded fragid, then the first such element in tree order is the indicated part of the document; stop the algorithm here.

We should clarify that if there is an element in the document tree or that the first such element in document in tree order per resolution on WICG/webcomponents#66

@rniwa
Copy link
Collaborator Author

rniwa commented May 4, 2016

@rniwa
Copy link
Collaborator Author

rniwa commented May 4, 2016

Step 6 has the same issue:

No decoded fragid: If there is an a element in the DOM that has a name attribute whose value is exactly equal to fragid (not decoded fragid), then the first such element in tree order is the indicated part of the document; stop the algorithm here.

@domenic
Copy link
Member

domenic commented May 4, 2016

I feel like there was a previous issue on the webcomponents repo for navigating to fragment IDs in the shadow DOM. But yeah, the conclusion was to not do such navigation if I recall. This is one of the many "in a document" checks that need to be audited and fixed; it's really helpful you found this one since it doesn't use "in a document" so it's harder to find via naive searching.

@domenic
Copy link
Member

domenic commented May 4, 2016

Oh, that was the issue you linked to in your OP. Should have clicked the link before submitting my comment.

@domenic domenic added the topic: shadow Relates to shadow trees (as defined in DOM) label May 4, 2016
rniwa added a commit to rniwa/web-platform-tests that referenced this issue May 5, 2016
As discussed on WICG/webcomponents#66 and whatwg/html#1192,
the user agent should not use an element that has an ID exactly equal to decoded fragid or an anchor element
with a name attribute exactly equal to fragid if the element inside a shadow tree as the indicated part of the document.

WebKit nightly builds and Google Chrome Canary both passes the test.
TakayoshiKochi pushed a commit to web-platform-tests/wpt that referenced this issue May 20, 2016
As discussed on WICG/webcomponents#66 and whatwg/html#1192,
the user agent should not use an element that has an ID exactly equal to decoded fragid or an anchor element
with a name attribute exactly equal to fragid if the element inside a shadow tree as the indicated part of the document.

WebKit nightly builds and Google Chrome Canary both passes the test.
annevk added a commit that referenced this issue May 25, 2016
This clarifies that #foo and such can never point to a node in a shadow
tree. Fixes #1192.
zcorpan pushed a commit that referenced this issue May 26, 2016
This clarifies that #foo and such can never point to a node in a shadow
tree. Fixes #1192.
@annevk
Copy link
Member

annevk commented May 26, 2016

Thanks again for filing this!

arronei pushed a commit to arronei/web-platform-tests that referenced this issue Jun 14, 2016
…tform-tests#2953)

As discussed on WICG/webcomponents#66 and whatwg/html#1192,
the user agent should not use an element that has an ID exactly equal to decoded fragid or an anchor element
with a name attribute exactly equal to fragid if the element inside a shadow tree as the indicated part of the document.

WebKit nightly builds and Google Chrome Canary both passes the test.
ivanzr pushed a commit to ivanzr/web-platform-tests that referenced this issue Jun 29, 2016
…tform-tests#2953)

As discussed on WICG/webcomponents#66 and whatwg/html#1192,
the user agent should not use an element that has an ID exactly equal to decoded fragid or an anchor element
with a name attribute exactly equal to fragid if the element inside a shadow tree as the indicated part of the document.

WebKit nightly builds and Google Chrome Canary both passes the test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: shadow Relates to shadow trees (as defined in DOM)
Development

No branches or pull requests

3 participants