-
Notifications
You must be signed in to change notification settings - Fork 300
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 declarative Shadow DOM features #858
Closed
+85
−29
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ffef2a2
Added "is declarative shadow root"
mfreed7 0e2223a
Added existing shadow root support
mfreed7 23ff7fb
Add getInnerHTML()
mfreed7 ffdc549
Pulled out "attach a shadow root" algorithm
mfreed7 6c35afa
Add note about multiple declarative roots
mfreed7 2f91c82
Remove link to "declarative shadow root"
mfreed7 8a0ab5d
Modified clone() to allow cloning templates with declarative SD
mfreed7 9efcb60
Better logic for detecting template
mfreed7 a6a9644
Two quick fixes
mfreed7 33f4adf
Cleanup
mfreed7 097c512
Only template contents
mfreed7 0c41665
Fix HTML link
mfreed7 191a88c
Addressed annevk's comments
mfreed7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the very least this should say OpenShadowRoots, but it seems better to me if we did not have a separate API here for open and closed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the "rest" of this interface, as explained here in the explainer. In particular, the section just below that, Closed shadow roots goes into the details of the interface. You essentially get two knobs.
includeShadowRoots
is an opt-in for any shadow roots to be serialized. The second input,closedRoots
is a list of closed shadow roots that you would like to be included. If a closed shadow root is encountered that is not in the list, it will be skipped to preserve encapsulation.I am going to add the corresponding change to my HTML spec PR.
LMK if the above clarifies the situation, or if you have further questions.