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

Recurse into shadow roots. #189

Closed
wants to merge 1 commit into from
Closed

Conversation

otherdaniel
Copy link
Collaborator

This proposes to recurse into any shadow roots.
This follows the discussion at #185

This proposes to recurse into any shadow roots. This follows the
discussion at WICG#185
Comment on lines +800 to +802
1. If |element| is a [=shadow host=]:
1. Run the steps of [=sanitize a document fragment=] algorithm on
|element|'s [=Element/shadow root=].
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest adding a note here that this is okay to do since we know our only entry point is the fragment parser.

If we ever have another entry point, such as an arbitrary node, we need a more complicated handshake to not violate encapsulation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should this be part of "handle funky elements"? It doesn't matter much but it seems this applies to all elements. But maybe "handle funky element" should be "sanitize an element" and all element-logic should move here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you call into sanitizer a document fragment, you need to pass a Sanitizer instance (I think this).
I too think it might make sense to throw stuff into a "handle element" function. Otherwise looks good.

@mozfreddyb
Copy link
Collaborator

I assume the spec is diverging from this section with your ongoing rewrite. OK to close?

@otherdaniel
Copy link
Collaborator Author

I assume the spec is diverging from this section with your ongoing rewrite. OK to close?

Yes to both.

@otherdaniel otherdaniel deleted the shadow-roots branch April 22, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants