Intent to Prototype: Declarative shadow DOM serialization

222 views
Skip to first unread message

Mason Freed

unread,
Jan 19, 2024, 3:03:21 PM1/19/24
to blink-dev

Contact emails

mas...@chromium.org

Explainer

https://github.com/whatwg/html/issues/8867#issuecomment-1856696628

Specification

None

Summary

The prototype implementation (which was shipped in 2020 and then shape-changed in 2023) contained a method called `getInnerHTML()` that could be used to serialize DOM trees containing shadow roots. That part of the prototype was not standardized with the rest of declarative shadow dom, and only recently has it reached spec consensus (https://github.com/whatwg/html/issues/8867). As part of that consensus, the shape of the getInnerHTML API changed. This feature represents the desire to ship the new, agreed-upon shape, which is: getHTML({includeShadowRoots:bool, shadowRoots:[roots]}).


Blink component

Blink>DOM>ShadowDOM

Motivation

This allows developers to serialize DOM trees containing shadow roots, which is otherwise a very manual process.



Initial public proposal

https://github.com/whatwg/html/issues/8867

TAG review

None

TAG review status

Pending

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Is this feature fully tested by web-platform-tests?

No

Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Tracking bug

https://crbug.com/1517959

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5102952270528512

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages