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

Add a non-normative note stating elements in shadow trees aren't exposed as named properties #304

Closed
rniwa opened this issue Sep 1, 2015 · 7 comments

Comments

@rniwa
Copy link
Collaborator

rniwa commented Sep 1, 2015

I think the following text in the spec

Window object named properties [HTML] must access the nodes in the document tree.

is meant to clarify that elements in shadow trees aren't exposed as named properties on Window.

Perhaps we want to add an informative note stating that explicitly.

@annevk
Copy link
Collaborator

annevk commented Sep 2, 2015

I don't understand this feedback.

This applies to a huge number of APIs. It wouldn't make sense to enumerate them all. Why this one?

@rniwa
Copy link
Collaborator Author

rniwa commented Sep 2, 2015

That too. It's a bit strange to explicitly call out this one. Does DOM spec says only nodes that are in the document (i.e. its root ancestor node is the document) are exposed as named properties?

@annevk
Copy link
Collaborator

annevk commented Sep 2, 2015

It seems pretty clear about "active document": https://html.spec.whatwg.org/multipage/browsers.html#named-access-on-the-window-object

The only curious thing might be whether an <iframe> inside a shadow tree creates a nested browsing context or not. And if not, what does it create?

@rniwa
Copy link
Collaborator Author

rniwa commented Sep 4, 2015

It should create a nested browsing context, right? I don't think there is anything special about iframes inside shadow trees.

@annevk
Copy link
Collaborator

annevk commented Sep 5, 2015

Well, if it creates a nested browsing context (and that requires a changed definition of "is in a document" iirc), it would be exposed on Window, unless we change that definition somehow.

@hayatoito
Copy link
Contributor

As the short time fix, we should change the nodes to anything (or something?) so that it also excludes browsing context in shadow trees?
The intention is "Don't leak anything in shadow trees via Window". However, I'm afraid that there is an exception we are missing.

@hayatoito hayatoito added html-dom and removed v1 labels Feb 17, 2016
@annevk
Copy link
Collaborator

annevk commented Feb 29, 2016

This is a duplicate of #145 I think.

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

No branches or pull requests

3 participants