You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declarative Shadow DOM is a declarative API that allows the creation of shadow roots using only HTML and no Javascript. This API allows Web Components that use Shadow DOM to make use of Server-Side Rendering (SSR), to get rendered content on screen quickly without requiring Javascript for shadow root attachment.
Reacted by firefoxic, Paweł Mrowiec, Nathan, Jeff Hitchcock, Rian Murnen, Valtteri Laitinen, Brad Dougherty, Alan Dávalos, Hawk Ticehurst, Roderick Gadellaa and 19 more
For survey data and web developer demand, in preliminary results from State of HTML 2023, Declarative Shadow DOM was a common response to the freeform question "Which existing HTML features or browser APIs are you unable to use because of browser differences or lack of support?"
From State of HTML preliminary results, Declarative Shadow DOM was among the features that respondents expressed the most interest for. Note that this wasn't freeform, it's based on the features the survey asked about experience and sentiment for.
This probably isn't really part of Declarative Shadow DOM, and there's no good reason for the tests to rely on these; the tests were only changed to rely on these functions in web-platform-tests/wpt#41704, which effectively reduced test coverage of Declarative Shadow DOM for Firefox and Safari (as they now all fail before running the actual test).
This probably isn't really part of Declarative Shadow DOM, and there's no good reason for the tests to rely on these; the tests were only changed to rely on these functions in web-platform-tests/wpt#41704, which effectively reduced test coverage of Declarative Shadow DOM for Firefox and Safari (as they now all fail before running the actual test).
I'm ok with doing that, but it'll take (a lot!) more work. You'll have to manually recursively traverse into shadow roots and serialize the whole tree yourself.
This is precisely why I really wanted to get setHTMLUnsafe and parseHTMLUnsafe landed in the spec before we landed declarative shadow DOM. It's basically required to use the feature. I'd consider them dependent features.
This proposal has been accepted as part of Interop 2024! On behalf of the entire Interop team, thank you for proposing it. You’ll be able to track progress on this topic throughout the year via the Interop 2024 dashboard.
Activity
foolip commentedon Oct 5, 2023
For survey data and web developer demand, in preliminary results from State of HTML 2023, Declarative Shadow DOM was a common response to the freeform question "Which existing HTML features or browser APIs are you unable to use because of browser differences or lack of support?"
foolip commentedon Oct 5, 2023
Shadow DOM,
ElementInternalsand Custom Elements were also a somewhat common responses.foolip commentedon Oct 25, 2023
From State of HTML preliminary results, Declarative Shadow DOM was among the features that respondents expressed the most interest for. Note that this wasn't freeform, it's based on the features the survey asked about experience and sentiment for.
gsnedders commentedon Nov 7, 2023
What's the status of https://github.com/web-platform-tests/wpt/blob/master/shadow-dom/declarative/getinnerhtml.tentative.html? The test links to whatwg/dom#831, but as Declarative Shadow DOM landed there's no
getInnerHTML, and there doesn't seem to be any open issue asking for it to be added.On the face of it, we should replace that test with a historical test that
getInnerHTMLisn't supported.mfreed7 commentedon Nov 11, 2023
whatwg/html#8867 is the issue discussing getInnerHTML.
gsnedders commentedon Nov 16, 2023
Ah, okay, so it's an ongoing open issue; I'd clearly misunderstood (and somehow failed to find that issue!).
gsnedders commentedon Nov 16, 2023
Several of the tests (
/shadow-dom/declarative/declarative-shadow-dom-attachment.html,/shadow-dom/declarative/declarative-shadow-dom-basic.html) rely on Element.prototype.setHTMLUnsafe and Document.prototype.parseHTMLUnsafe.This probably isn't really part of Declarative Shadow DOM, and there's no good reason for the tests to rely on these; the tests were only changed to rely on these functions in web-platform-tests/wpt#41704, which effectively reduced test coverage of Declarative Shadow DOM for Firefox and Safari (as they now all fail before running the actual test).
See web-platform-tests/wpt#43202 to partially revert that.
mfreed7 commentedon Nov 16, 2023
I'm ok with doing that, but it'll take (a lot!) more work. You'll have to manually recursively traverse into shadow roots and serialize the whole tree yourself.
This is precisely why I really wanted to get
setHTMLUnsafeandparseHTMLUnsafelanded in the spec before we landed declarative shadow DOM. It's basically required to use the feature. I'd consider them dependent features.dandclark commentedon Feb 1, 2024
This proposal has been accepted as part of Interop 2024! On behalf of the entire Interop team, thank you for proposing it. You’ll be able to track progress on this topic throughout the year via the Interop 2024 dashboard.