Add referenceTarget to ShadowRootInit argument to attachShadow()#1062
Add referenceTarget to ShadowRootInit argument to attachShadow()#1062Westbrook merged 2 commits intoWICG:gh-pagesfrom
Conversation
Westbrook
left a comment
There was a problem hiding this comment.
LGTM, quick question, however:
What happens in the time between setting the referenceTarget, via either technique, and that element actual existing due to the innerHTML being set? Should we talk about that in any way?
That's implicitly covered by the fact that reference target is a Live Reference. Basically, the reference target gets updated any time something changes in the DOM that affects it. For example adding elements to the shadow DOM tree by setting That said, it might be worth expanding the Live References section to include mentions of the DOM changing, instead of only mentioning the referenceTarget changing. I can make that change in a separate PR. |
|
Added a follow-up PR to clarify the live references: #1067 |
From review feedback in the Chromium implementation CL, it may be good to add
referenceTargetto theShadowRootInitdictionary argument toattachShadow().https://chromium-review.googlesource.com/c/chromium/src/+/5615615/comment/1a3651e1_4b117a02/