Intent to ship in Nightly: Declarative ShadowDOM

539 views
Skip to first unread message

Adam Vandolder

unread,
Nov 30, 2023, 10:57:06 AM11/30/23
to dev-pl...@mozilla.org
Summary: Declarative ShadowDOM is a recent addition to the HTML & DOM standards that enables the usage of shadow roots in a declarative manner directly within HTML, without the need for using Javascript and attachShadow.



Platforms: All

Pref: dom.webcomponents.shadowdom.declarative.enabled

This feature is already shipping in both Blink and Webkit.

Nicolas Chevobbe

unread,
Nov 30, 2023, 11:33:30 AM11/30/23
to dev-pl...@mozilla.org, Adam Vandolder
Sweet!
I filed a DevTools bug to make sure those would be supported as the JS-registered ones: https://bugzilla.mozilla.org/show_bug.cgi?id=1867577
I did not went over the spec yet, but is there any feature we should consider that would help debugging them easily?

Sebastian Zartner

unread,
Dec 25, 2023, 4:35:13 AM12/25/23
to Nicolas Chevobbe, dev-pl...@mozilla.org, Adam Vandolder
On Thu, 30 Nov 2023 at 17:33, Nicolas Chevobbe <nche...@mozilla.com> wrote:
I did not went over the spec yet, but is there any feature we should consider that would help debugging them easily?

The only feature I can imagine is to give a hint in the Inspector whether the Shadow DOM was created declaratively or imperatively (via JavaScript). So I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1871813 for that.
For imperatively created Shadow DOM, you could link to the statement in the JS code. For that I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1871814. For declaratively defined Shadow DOM you can't provide such linking, because the related <template> element is removed at parse time. I don't know if there's any additional thing that could help debugging Declarative Shadow DOM.

Sebastian
 
On Thursday, November 30, 2023 at 4:57:06 PM UTC+1 Adam Vandolder wrote:
Summary: Declarative ShadowDOM is a recent addition to the HTML & DOM standards that enables the usage of shadow roots in a declarative manner directly within HTML, without the need for using Javascript and attachShadow.



Platforms: All

Pref: dom.webcomponents.shadowdom.declarative.enabled

This feature is already shipping in both Blink and Webkit.

--
You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/bea4a8e4-d06d-4708-ab03-8600cdda8eecn%40mozilla.org.

Thomas Wisniewski

unread,
Dec 25, 2023, 2:16:15 PM12/25/23
to Sebastian Zartner, Nicolas Chevobbe, dev-pl...@mozilla.org, Adam Vandolder
I wonder if for the declarative case, the source location could be stored with/for the template at parse time, as it is being removed?

Reply all
Reply to author
Forward
0 new messages