Implement declarative shadow dom (#34964)

* Implement declarative shadow dom

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Set allowDeclarativeShadowRoots false for innerHTML

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Enable allowDeclarativeShadowRoots for Document

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Expose HTMLTemplateElement to js

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Implemenet setHTMLUnsafe and add more test cases

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Declarative shadow dom: minor updates and expected test result update

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Shadow-dom: add more test cases

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Update comments according to the spec

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

* Bump html5ever version

Signed-off-by: batu_hoang <longvatrong111@gmail.com>

---------

Signed-off-by: batu_hoang <longvatrong111@gmail.com>
This commit is contained in:
batu_hoang 2025-03-17 17:41:34 +08:00 committed by GitHub
parent f483a3d34b
commit 28c8c1df0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 360 additions and 1965 deletions

View file

@ -1,3 +0,0 @@
[Element-setHTMLUnsafe-04.html]
[setHTMLUnsafe should leave the removed children alone.]
expected: FAIL

View file

@ -1,6 +1,3 @@
[setHTMLUnsafe-CEReactions.html]
[Element.setHTMLUnsafe should trigger custom element reactions.]
expected: FAIL
[ShadowRoot.setHTMLUnsafe should trigger custom element reactions.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[setHTMLUnsafe-xml.html]
[setHTMLUnsafe should still parse HTML even in XML documents.]
expected: FAIL
[setHTMLUnsafe should still parse HTML even in SVG documents.]
expected: FAIL

View file

@ -1,15 +1,6 @@
[setHTMLUnsafe.html]
[Element: setHTMLUnsafe with no shadowdom.]
expected: FAIL
[Element: setHTMLUnsafe with shadowdom.]
expected: FAIL
[ShadowRoot: setHTMLUnsafe with no shadowdom.]
expected: FAIL
[ShadowRoot: setHTMLUnsafe with shadowdom.]
expected: FAIL
[template.setHTMLUnsafe() should modify template content fragment rather than actual children.]
expected: FAIL