WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
262608
support includeShadowRoots in JSAPI for streaming declarative shadow dom
https://bugs.webkit.org/show_bug.cgi?id=262608
Summary
support includeShadowRoots in JSAPI for streaming declarative shadow dom
Onur Gumus
Reported
2023-10-04 02:19:24 PDT
The following code works in chrome allowing declarative shadow dom parsed and inserted with javascript. <script> const html = ` <div> <template shadowrootmode="open"></template> </div> `; const div = document.createElement('div'); div.innerHTML = html; // No shadow root here const fragment = new DOMParser().parseFromString(html, 'text/html', { includeShadowRoots: true }); // Shadow root here </script> However includeShadowRoots parameter is ignored by WebKit For more info:
https://developer.chrome.com/articles/declarative-shadow-dom/#parser-only
Attachments
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2023-10-04 13:52:35 PDT
The plan is to add parseHTMLUnsafe and support declarative shadow DOM there, not add an option to DOMParser.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug