Fixed
Status Update
Comments
ma...@chromium.org <ma...@chromium.org> #2
[Empty comment from Monorail migration]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #3
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/6f3e65a86ef12b6c344a742c3947c4ea35ce0425
commit 6f3e65a86ef12b6c344a742c3947c4ea35ce0425
Author: Mason Freed <masonf@chromium.org>
Date: Mon Jan 22 19:22:47 2024
Update web_feature enums to include the branch points
Convenience only, no functional change here.
Bug: 1519972,1517959
Change-Id: I36ca533151ca1cf6fd66ee9641ec6de1d2921f29
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5218443
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1250343}
[modify]https://crrev.com/6f3e65a86ef12b6c344a742c3947c4ea35ce0425/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
commit 6f3e65a86ef12b6c344a742c3947c4ea35ce0425
Author: Mason Freed <masonf@chromium.org>
Date: Mon Jan 22 19:22:47 2024
Update web_feature enums to include the branch points
Convenience only, no functional change here.
Bug: 1519972,1517959
Change-Id: I36ca533151ca1cf6fd66ee9641ec6de1d2921f29
Reviewed-on:
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1250343}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #4
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56
commit 16a4b164b15cbf0c52147bc1f4190d3b5c51bd56
Author: Mason Freed <masonf@chromium.org>
Date: Wed Jan 24 16:12:49 2024
Add serializable attribute to shadow roots, and prep for setHTML [1/2]
This CL adds a `serializable` bool to ShadowRoot, and makes it available
to set via `attachShadow()` plus read/write via an IDL attribute. This
also adds a content attribute `serializable` on `HTMLTemplateElement`
and a corresponding reflection. The `serializable` state will be tested
as part of the next CL which implements `getHTML()` and uses
`serializable`.
This CL also takes the opportunity to do a few other things to prepare
for `getHTML()`:
1. Add a feature flag `ElementGetHTML` which will gate the new function
and which also gates the `serializable` changes above.
2. Add a feature flag `ElementGetInnerHTML` which is default-"stable"
and will gate the getInnerHTML() function (mostly in the next CL).
3. Rename `IncludeShadowRoots` as used in *set* methods to
`ParseDeclarativeShadowRoots` to better represent what it means,
and also to disambiguate it from some of the `getInnerHTML`
parameters, which are unrelated. These names refer to Chromium C++
internal naming, and nothing web-exposed.
This work falls under these two chromestatus entries:
https://chromestatus.com/feature/5081733588582400
https://chromestatus.com/feature/5102952270528512
and these two blink-dev threads:
https://groups.google.com/a/chromium.org/g/blink-dev/c/PE4VwMjLVTo
https://groups.google.com/a/chromium.org/g/blink-dev/c/it0X7BOimKw
Bug: 1519972, 1517959
Change-Id: Ia57ad71553f162ddc9c304402ac9e7d356940946
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5218429
Commit-Queue: David Baron <dbaron@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251428}
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/platform/runtime_enabled_features.json5
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/dom/shadow_root.cc
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/html/html_template_element.idl
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/dom/shadow_root_init.idl
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/dom/element.h
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/tools/metrics/histograms/enums.xml
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/dom/element.cc
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/web_tests/external/wpt/shadow-dom/declarative/declarative-shadow-dom-opt-in.html
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/web_tests/webexposed/element-instance-property-listing-expected.txt
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/dom/shadow_root.idl
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/html/html_attribute_names.json5
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/dom/shadow_root.h
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/editing/serializers/serialization.cc
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/web_tests/external/wpt/shadow-dom/declarative/declarative-shadow-dom-opt-in-expected.txt
[modify]https://crrev.com/16a4b164b15cbf0c52147bc1f4190d3b5c51bd56/third_party/blink/renderer/core/editing/serializers/serialization.h
commit 16a4b164b15cbf0c52147bc1f4190d3b5c51bd56
Author: Mason Freed <masonf@chromium.org>
Date: Wed Jan 24 16:12:49 2024
Add serializable attribute to shadow roots, and prep for setHTML [1/2]
This CL adds a `serializable` bool to ShadowRoot, and makes it available
to set via `attachShadow()` plus read/write via an IDL attribute. This
also adds a content attribute `serializable` on `HTMLTemplateElement`
and a corresponding reflection. The `serializable` state will be tested
as part of the next CL which implements `getHTML()` and uses
`serializable`.
This CL also takes the opportunity to do a few other things to prepare
for `getHTML()`:
1. Add a feature flag `ElementGetHTML` which will gate the new function
and which also gates the `serializable` changes above.
2. Add a feature flag `ElementGetInnerHTML` which is default-"stable"
and will gate the getInnerHTML() function (mostly in the next CL).
3. Rename `IncludeShadowRoots` as used in *set* methods to
`ParseDeclarativeShadowRoots` to better represent what it means,
and also to disambiguate it from some of the `getInnerHTML`
parameters, which are unrelated. These names refer to Chromium C++
internal naming, and nothing web-exposed.
This work falls under these two chromestatus entries:
and these two blink-dev threads:
Bug: 1519972, 1517959
Change-Id: Ia57ad71553f162ddc9c304402ac9e7d356940946
Reviewed-on:
Commit-Queue: David Baron <dbaron@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251428}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #5
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/09e2fe4b993e2bad4b955c57589f887a42633327
commit 09e2fe4b993e2bad4b955c57589f887a42633327
Author: Mason Freed <masonf@chromium.org>
Date: Wed Jan 24 18:33:32 2024
Add getHTML() and modify getInnerHTML() accordingly [2/2]
This CL adds a new getHTML() method, and modifies the existing
getInnerHTML() method accordingly. The behavior of getInnerHTML()
is not changed by this CL, but the implementation is modified to allow
the code to be shared. The new method follows the discussion and
conclusions here:
https://github.com/whatwg/html/issues/8867#issuecomment-1856696628
Essentially, that is:
1. Provide a boolean option to getHTML() that says "please serialize
opted-in shadow roots". The default for this option is false.
2. Provide an option to getHTML() containing a sequence of shadowRoots
that should be serialized, independent of whether they opted in via
the flag above.
This work falls under these two chromestatus entries:
https://chromestatus.com/feature/5081733588582400
https://chromestatus.com/feature/5102952270528512
and these two blink-dev threads:
https://groups.google.com/a/chromium.org/g/blink-dev/c/PE4VwMjLVTo
https://groups.google.com/a/chromium.org/g/blink-dev/c/it0X7BOimKw
Bug: 1519972, 1517959
Change-Id: I5181a0702a12d550b4dab64c0c306ea2ccb25fa3
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5219591
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251541}
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/frame/frame_serializer_delegate_impl.cc
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/editing/serializers/markup_accumulator.h
[add]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.tentative.html
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/bindings/idl_in_core.gni
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/web_tests/webexposed/element-instance-property-listing-expected.txt
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/editing/serializers/serialization.cc
[add]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/get_html_options.idl
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/xml/xml_serializer.cc
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/shadow_root.cc
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/frame/frame_serializer.h
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/element.h
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/container_node.h
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/frame/frame_serializer_delegate_impl.h
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/frame/frame_serializer.cc
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/modules/content_extraction/inner_html_builder.cc
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/element.cc
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/bindings/generated_in_core.gni
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/get_inner_html_options.idl
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/container_node.cc
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/web_tests/external/wpt/shadow-dom/declarative/getinnerhtml.tentative.html
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/shadow_root.idl
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/shadow_root.h
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/dom/element.idl
[modify]https://crrev.com/09e2fe4b993e2bad4b955c57589f887a42633327/third_party/blink/renderer/core/editing/serializers/serialization.h
commit 09e2fe4b993e2bad4b955c57589f887a42633327
Author: Mason Freed <masonf@chromium.org>
Date: Wed Jan 24 18:33:32 2024
Add getHTML() and modify getInnerHTML() accordingly [2/2]
This CL adds a new getHTML() method, and modifies the existing
getInnerHTML() method accordingly. The behavior of getInnerHTML()
is not changed by this CL, but the implementation is modified to allow
the code to be shared. The new method follows the discussion and
conclusions here:
Essentially, that is:
1. Provide a boolean option to getHTML() that says "please serialize
opted-in shadow roots". The default for this option is false.
2. Provide an option to getHTML() containing a sequence of shadowRoots
that should be serialized, independent of whether they opted in via
the flag above.
This work falls under these two chromestatus entries:
and these two blink-dev threads:
Bug: 1519972, 1517959
Change-Id: I5181a0702a12d550b4dab64c0c306ea2ccb25fa3
Reviewed-on:
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251541}
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #6
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/a169d68df1facae824e51a228fadf7e1257c92ea
commit a169d68df1facae824e51a228fadf7e1257c92ea
Author: Mason Freed <masonf@chromium.org>
Date: Fri Jan 26 19:00:54 2024
Add serializable support for declarative shadow dom
This adds the ability to use the `serializable` attribute on
the `<template shadowrootmode>` element, and have the resulting
shadow root have its `serializable` attribute set. It also makes
serializable shadow roots serialize to a template with a
`serializable` attribute.
Fixed: 1517959
Change-Id: I64afebc285f355acb0a3a8a401c364188cd2ede4
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5239221
Commit-Queue: David Baron <dbaron@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1252777}
[modify]https://crrev.com/a169d68df1facae824e51a228fadf7e1257c92ea/third_party/blink/renderer/platform/runtime_enabled_features.json5
[modify]https://crrev.com/a169d68df1facae824e51a228fadf7e1257c92ea/third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
[modify]https://crrev.com/a169d68df1facae824e51a228fadf7e1257c92ea/third_party/blink/renderer/core/dom/element.h
[modify]https://crrev.com/a169d68df1facae824e51a228fadf7e1257c92ea/third_party/blink/renderer/core/dom/element.cc
[modify]https://crrev.com/a169d68df1facae824e51a228fadf7e1257c92ea/third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.tentative.html
[modify]https://crrev.com/a169d68df1facae824e51a228fadf7e1257c92ea/third_party/blink/renderer/core/html/parser/html_construction_site.cc
commit a169d68df1facae824e51a228fadf7e1257c92ea
Author: Mason Freed <masonf@chromium.org>
Date: Fri Jan 26 19:00:54 2024
Add serializable support for declarative shadow dom
This adds the ability to use the `serializable` attribute on
the `<template shadowrootmode>` element, and have the resulting
shadow root have its `serializable` attribute set. It also makes
serializable shadow roots serialize to a template with a
`serializable` attribute.
Fixed: 1517959
Change-Id: I64afebc285f355acb0a3a8a401c364188cd2ede4
Reviewed-on:
Commit-Queue: David Baron <dbaron@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1252777}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #7
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/6d221eb152fe78aee3f6a144abf910b5e3603446
commit 6d221eb152fe78aee3f6a144abf910b5e3603446
Author: Mason Freed <masonf@chromium.org>
Date: Tue Jan 30 17:08:30 2024
Check for matching `serializable` in attachShadow
This parameter was added ([1]) after the initial check code was written
([3]). Note that [2] also added `clonable` but there's an issue [4]
about checking that in a similar way.
[1]https://chromium-review.googlesource.com/c/chromium/src/+/5239221
[2]https://chromium-review.googlesource.com/c/chromium/src/+/5239277
[3]https://chromium-review.googlesource.com/c/chromium/src/+/5191750
[4]https://github.com/whatwg/html/issues/10107
Bug: 1517959
Change-Id: I689c6a6f84fb7ce298cf187076ae228fef6cc348
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5242281
Commit-Queue: David Baron <dbaron@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1253972}
[modify]https://crrev.com/6d221eb152fe78aee3f6a144abf910b5e3603446/third_party/blink/web_tests/virtual/new-shadowroot-attach-behavior-disabled/external/wpt/shadow-dom/declarative/declarative-shadow-dom-repeats-expected.txt
[modify]https://crrev.com/6d221eb152fe78aee3f6a144abf910b5e3603446/third_party/blink/renderer/core/dom/shadow_root_init.idl
[modify]https://crrev.com/6d221eb152fe78aee3f6a144abf910b5e3603446/third_party/blink/web_tests/external/wpt/shadow-dom/declarative/declarative-shadow-dom-repeats.html
[modify]https://crrev.com/6d221eb152fe78aee3f6a144abf910b5e3603446/third_party/blink/renderer/core/dom/element.cc
commit 6d221eb152fe78aee3f6a144abf910b5e3603446
Author: Mason Freed <masonf@chromium.org>
Date: Tue Jan 30 17:08:30 2024
Check for matching `serializable` in attachShadow
This parameter was added ([1]) after the initial check code was written
([3]). Note that [2] also added `clonable` but there's an issue [4]
about checking that in a similar way.
[1]
[2]
[3]
[4]
Bug: 1517959
Change-Id: I689c6a6f84fb7ce298cf187076ae228fef6cc348
Reviewed-on:
Commit-Queue: David Baron <dbaron@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1253972}
[modify]
[modify]
[modify]
[modify]
is...@google.com <is...@google.com> #8
This issue was migrated from crbug.com/chromium/1517959?no_tracker_redirect=1
[Monorail components added to Component Tags custom field.]
[Monorail components added to Component Tags custom field.]
ap...@google.com <ap...@google.com> #9
Project: chromium/src
Branch: main
commit 9ab453c8e7d336f430c50488e8638ca802b69d80
Author: Mason Freed <masonf@chromium.org>
Date: Tue Feb 20 21:54:16 2024
Adjust getHTML behavior to match recent consensus
This includes two changes:
1. Rename includeShadowRoots to serializableShadowRoots
2. Do not throw an exception if serializableShadowRoots is false
but shadowRoots is non-empty.
I also added IDL defaults for both parameters to clean up the C++.
I also added a test of the use counter for getHTML().
Bug: 41490936
Change-Id: Ieedd81b5165d9652c3a7b68dea4a4fa5fb088560
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5304121
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262930}
M third_party/blink/renderer/core/dom/container_node.cc
M third_party/blink/renderer/core/dom/get_html_options.idl
M third_party/blink/web_tests/editing/pasteboard/paste-and-sanitize.html
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.tentative.html
A third_party/blink/web_tests/shadow-dom/gethtml-use-counter.html
https://chromium-review.googlesource.com/5304121
Branch: main
commit 9ab453c8e7d336f430c50488e8638ca802b69d80
Author: Mason Freed <masonf@chromium.org>
Date: Tue Feb 20 21:54:16 2024
Adjust getHTML behavior to match recent consensus
This includes two changes:
1. Rename includeShadowRoots to serializableShadowRoots
2. Do not throw an exception if serializableShadowRoots is false
but shadowRoots is non-empty.
I also added IDL defaults for both parameters to clean up the C++.
I also added a test of the use counter for getHTML().
Bug: 41490936
Change-Id: Ieedd81b5165d9652c3a7b68dea4a4fa5fb088560
Reviewed-on:
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262930}
M third_party/blink/renderer/core/dom/container_node.cc
M third_party/blink/renderer/core/dom/get_html_options.idl
M third_party/blink/web_tests/editing/pasteboard/paste-and-sanitize.html
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.tentative.html
A third_party/blink/web_tests/shadow-dom/gethtml-use-counter.html
ap...@google.com <ap...@google.com> #10
Project: chromium/src
Branch: main
commit 8ad1dff54b5331bb7f9dcc2c197d08de41265cb3
Author: Mason Freed <masonf@chromium.org>
Date: Mon Mar 18 19:38:37 2024
Rename serializable to shadowrootserializable
See the conversation here:
https://github.com/whatwg/html/pull/10139
But the TL;DR is that the `<template>` attribute corresponding
to the declarative shadow root `serializable` attribute should
be named in a parallel way to other DSD-related attributes,
meaning it should start with `shadowroot*`.
Bug: 41490936
Change-Id: I40ea496c22147bac7dcdfb74cd7bf4a3abae8be9
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5375416
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1274374}
M third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
M third_party/blink/renderer/core/html/html_attribute_names.json5
M third_party/blink/renderer/core/html/html_template_element.idl
M third_party/blink/renderer/core/html/parser/html_construction_site.cc
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/declarative-shadow-dom-repeats.html
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.tentative.html
M third_party/blink/web_tests/webexposed/element-instance-property-listing-expected.txt
M third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
https://chromium-review.googlesource.com/5375416
Branch: main
commit 8ad1dff54b5331bb7f9dcc2c197d08de41265cb3
Author: Mason Freed <masonf@chromium.org>
Date: Mon Mar 18 19:38:37 2024
Rename serializable to shadowrootserializable
See the conversation here:
But the TL;DR is that the `<template>` attribute corresponding
to the declarative shadow root `serializable` attribute should
be named in a parallel way to other DSD-related attributes,
meaning it should start with `shadowroot*`.
Bug: 41490936
Change-Id: I40ea496c22147bac7dcdfb74cd7bf4a3abae8be9
Reviewed-on:
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1274374}
M third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
M third_party/blink/renderer/core/html/html_attribute_names.json5
M third_party/blink/renderer/core/html/html_template_element.idl
M third_party/blink/renderer/core/html/parser/html_construction_site.cc
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/declarative-shadow-dom-repeats.html
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.tentative.html
M third_party/blink/web_tests/webexposed/element-instance-property-listing-expected.txt
M third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
ap...@google.com <ap...@google.com> #11
Project: chromium/src
Branch: main
commit f0427e6a25e7a2f01ae351841e5c7c5151c3f8b7
Author: Mason Freed <masonf@chromium.org>
Date: Thu Mar 21 00:41:45 2024
Mark getHTML() test non-tentative
The spec is landing:
https://github.com/whatwg/html/pull/10139
Bug: 41490936
Change-Id: Ia568d9f1adc9623298db6fd470383930fa5d9d9d
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5378423
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1275958}
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.html
https://chromium-review.googlesource.com/5378423
Branch: main
commit f0427e6a25e7a2f01ae351841e5c7c5151c3f8b7
Author: Mason Freed <masonf@chromium.org>
Date: Thu Mar 21 00:41:45 2024
Mark getHTML() test non-tentative
The spec is landing:
Bug: 41490936
Change-Id: Ia568d9f1adc9623298db6fd470383930fa5d9d9d
Reviewed-on:
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1275958}
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.html
ap...@google.com <ap...@google.com> #12
Project: chromium/src
Branch: main
commit b325c32f1181c2dba2e339c134b3461af92b1afe
Author: Mason Freed <masonf@chromium.org>
Date: Mon Mar 25 16:32:37 2024
Make get{Inner}HTML return DOMString not HTMLString
HTMLString is used for string input values under Trusted Types. In
the case of get{Inner}HTML, it was being used as a return value, which
means it behaves exactly as a DOMString. So make the IDL honest.
Bug: 41490936
Change-Id: I9620f08b7837d9c4c68fac6904496b38395b6e78
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5388595
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1277703}
M third_party/blink/renderer/core/dom/element.idl
https://chromium-review.googlesource.com/5388595
Branch: main
commit b325c32f1181c2dba2e339c134b3461af92b1afe
Author: Mason Freed <masonf@chromium.org>
Date: Mon Mar 25 16:32:37 2024
Make get{Inner}HTML return DOMString not HTMLString
HTMLString is used for string input values under Trusted Types. In
the case of get{Inner}HTML, it was being used as a return value, which
means it behaves exactly as a DOMString. So make the IDL honest.
Bug: 41490936
Change-Id: I9620f08b7837d9c4c68fac6904496b38395b6e78
Reviewed-on:
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1277703}
M third_party/blink/renderer/core/dom/element.idl
ma...@chromium.org <ma...@chromium.org>
ap...@google.com <ap...@google.com> #13
Project: chromium/src
Branch: main
commit df6ed80a8369cb957c564785810405bf9b5a4008
Author: Mason Freed <masonf@chromium.org>
Date: Thu Mar 28 22:39:32 2024
Add a test of the ordering of getHTML serialization
This adds a test to verify that the serialized version of a shadow
root:
1. has the `<template shadowroot>` first, before any children,
regardless of where the initial DSD content put them.
2. has the various shadowroot* attributes in a well defined order,
again regardless of where the initial DSD put them.
This came from a comment on the spec PR, here:
https://github.com/whatwg/html/pull/10139#discussion_r1538167358
(Note that Github currently doesn't properly handle links to
"Resolved" conversations, and the above conversation is resolved.
So I guess trust me that the request was to add testing for this
case!)
Bug: 41490936
Change-Id: I7866b61b768f645d61142a1fd4a9490ee0732dc2
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5405665
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1279973}
A third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml-ordering.html
https://chromium-review.googlesource.com/5405665
Branch: main
commit df6ed80a8369cb957c564785810405bf9b5a4008
Author: Mason Freed <masonf@chromium.org>
Date: Thu Mar 28 22:39:32 2024
Add a test of the ordering of getHTML serialization
This adds a test to verify that the serialized version of a shadow
root:
1. has the `<template shadowroot>` first, before any children,
regardless of where the initial DSD content put them.
2. has the various shadowroot* attributes in a well defined order,
again regardless of where the initial DSD put them.
This came from a comment on the spec PR, here:
(Note that Github currently doesn't properly handle links to
"Resolved" conversations, and the above conversation is resolved.
So I guess trust me that the request was to add testing for this
case!)
Bug: 41490936
Change-Id: I7866b61b768f645d61142a1fd4a9490ee0732dc2
Reviewed-on:
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1279973}
A third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml-ordering.html
ap...@google.com <ap...@google.com> #14
Project: chromium/src
Branch: main
commit 62148676a62ab94abd8a9e7e6f2a3ba31150dab9
Author: Mason Freed <masonf@chromium.org>
Date: Sun Mar 31 20:13:35 2024
Fix a CHECK failure when getHTML is disabled
The CHECK was checking the wrong feature for serializable. It
should have checked `DeclarativeShadowDOMSerializable`. This CL
also adds a virtual suite that runs declarative SD tests with
the ElementGetHTML flag disabled, to catch other such cases.
Bug: 41490936
Change-Id: I1271a0e077030f36c5c455caf7b5a30c0615650e
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5406392
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1280619}
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/web_tests/VirtualTestSuites
A third_party/blink/web_tests/virtual/gethtml-disabled/README.md
A third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/declarative-shadow-dom-repeats-expected.txt
A third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-expected.txt
A third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-ordering-expected.txt
A third_party/blink/web_tests/virtual/gethtml-disabled/shadow-dom/gethtml-use-counter-expected.txt
https://chromium-review.googlesource.com/5406392
Branch: main
commit 62148676a62ab94abd8a9e7e6f2a3ba31150dab9
Author: Mason Freed <masonf@chromium.org>
Date: Sun Mar 31 20:13:35 2024
Fix a CHECK failure when getHTML is disabled
The CHECK was checking the wrong feature for serializable. It
should have checked `DeclarativeShadowDOMSerializable`. This CL
also adds a virtual suite that runs declarative SD tests with
the ElementGetHTML flag disabled, to catch other such cases.
Bug: 41490936
Change-Id: I1271a0e077030f36c5c455caf7b5a30c0615650e
Reviewed-on:
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1280619}
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/web_tests/VirtualTestSuites
A third_party/blink/web_tests/virtual/gethtml-disabled/README.md
A third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/declarative-shadow-dom-repeats-expected.txt
A third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-expected.txt
A third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-ordering-expected.txt
A third_party/blink/web_tests/virtual/gethtml-disabled/shadow-dom/gethtml-use-counter-expected.txt
ap...@google.com <ap...@google.com> #15
Project: chromium/src
Branch: main
commit e3399fab233e23c3f6e1ad612975763dfd7fd655
Author: Mason Freed <masonf@chromium.org>
Date: Fri Apr 05 21:12:14 2024
Augment getHTML testing to include light DOM and inner element
Two cases were not being tested:
1. Serializing an element that has both shadow DOM and also
light DOM content.
2. Serializing the *inner* HTML of an element that itself has
a shadow root (which returns just the `<template>`).
It also turns out that in case 1, Blink was serializing the light
DOM children first, before the shadow `<template>`. This CL
corrects that.
Bug: 41490936
Change-Id: Iae1dc861d78e829a9305132e3f9dbb6fbcc467d3
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5421132
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1283391}
M third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.html
M third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-expected.txt
https://chromium-review.googlesource.com/5421132
Branch: main
commit e3399fab233e23c3f6e1ad612975763dfd7fd655
Author: Mason Freed <masonf@chromium.org>
Date: Fri Apr 05 21:12:14 2024
Augment getHTML testing to include light DOM and inner element
Two cases were not being tested:
1. Serializing an element that has both shadow DOM and also
light DOM content.
2. Serializing the *inner* HTML of an element that itself has
a shadow root (which returns just the `<template>`).
It also turns out that in case 1, Blink was serializing the light
DOM children first, before the shadow `<template>`. This CL
corrects that.
Bug: 41490936
Change-Id: Iae1dc861d78e829a9305132e3f9dbb6fbcc467d3
Reviewed-on:
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1283391}
M third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.html
M third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-expected.txt
an...@gmail.com <an...@gmail.com> #16
ap...@google.com <ap...@google.com> #17
Project: chromium/src
Branch: main
commit 6fbb84fc49b18da4e85ad6da507a0270e4630651
Author: Mason Freed <masonf@chromium.org>
Date: Thu Apr 11 16:48:28 2024
Ship getHTML() feature plus `serializable` attribute
I2S:
-https://groups.google.com/a/chromium.org/g/blink-dev/c/T4jcCXRkwB8/m/GD81-4bNAAAJ
Spec:
-https://github.com/whatwg/html/pull/10139
-https://github.com/whatwg/dom/pull/1256
Fixed: 41490936
Change-Id: Ie9b52d5d7a5aa626f1d9f96326c2d4826e11874f
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5427272
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1285896}
M third_party/blink/renderer/platform/runtime_enabled_features.json5
M third_party/blink/web_tests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
M third_party/blink/web_tests/virtual/stable/webexposed/global-interface-listing-expected.txt
https://chromium-review.googlesource.com/5427272
Branch: main
commit 6fbb84fc49b18da4e85ad6da507a0270e4630651
Author: Mason Freed <masonf@chromium.org>
Date: Thu Apr 11 16:48:28 2024
Ship getHTML() feature plus `serializable` attribute
I2S:
-
Spec:
-
-
Fixed: 41490936
Change-Id: Ie9b52d5d7a5aa626f1d9f96326c2d4826e11874f
Reviewed-on:
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1285896}
M third_party/blink/renderer/platform/runtime_enabled_features.json5
M third_party/blink/web_tests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
M third_party/blink/web_tests/virtual/stable/webexposed/global-interface-listing-expected.txt
ap...@google.com <ap...@google.com> #18
Project: chromium/src
Branch: main
commit 00d1bed8c34f38beba67bbb8c1c0fae432d72b4b
Author: Mason Freed <masonf@chromium.org>
Date: Fri Apr 12 16:29:30 2024
Remove distinction for open roots only for serializableShadowRoots
Per the spec change:
https://github.com/whatwg/html/pull/10260
This is a small behavior change. If `{serializableShadowRoots:true}`
and a given shadow root is `serializable`, then serialize it, even
if it is closed.
Tests should flow in from this upstream WPT change:
https://github.com/web-platform-tests/wpt/pull/45624
Bug: 41490936
Change-Id: I85f239599dda60637ff6301d1a501f9cce24a861
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5448166
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1286531}
M third_party/blink/renderer/core/dom/container_node.cc
M third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
M third_party/blink/renderer/core/editing/serializers/serialization.h
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.html
https://chromium-review.googlesource.com/5448166
Branch: main
commit 00d1bed8c34f38beba67bbb8c1c0fae432d72b4b
Author: Mason Freed <masonf@chromium.org>
Date: Fri Apr 12 16:29:30 2024
Remove distinction for open roots only for serializableShadowRoots
Per the spec change:
This is a small behavior change. If `{serializableShadowRoots:true}`
and a given shadow root is `serializable`, then serialize it, even
if it is closed.
Tests should flow in from this upstream WPT change:
Bug: 41490936
Change-Id: I85f239599dda60637ff6301d1a501f9cce24a861
Reviewed-on:
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1286531}
M third_party/blink/renderer/core/dom/container_node.cc
M third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
M third_party/blink/renderer/core/editing/serializers/serialization.h
M third_party/blink/web_tests/external/wpt/shadow-dom/declarative/gethtml.html
ap...@google.com <ap...@google.com> #19
Project: chromium/src
Branch: main
commit 634acb107f2c0153aeda12dab3fde11aed869b2b
Author: Mason Freed <masonf@chromium.org>
Date: Tue May 28 16:37:51 2024
Remove the ElementGetHTML and DeclarativeShadowDOMSerializable flags
Both flags were shipped to stable in M125, and can now be safely
removed.
Bug: 41490936
Change-Id: I2fa5e85880e3066763867ec132d705cc115e29dc
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5571638
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306818}
M third_party/blink/renderer/core/dom/container_node.cc
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.idl
M third_party/blink/renderer/core/dom/shadow_root.idl
M third_party/blink/renderer/core/dom/shadow_root_init.idl
M third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
M third_party/blink/renderer/core/html/html_template_element.idl
M third_party/blink/renderer/core/html/parser/html_construction_site.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
M third_party/blink/web_tests/TestExpectations
M third_party/blink/web_tests/VirtualTestSuites
D third_party/blink/web_tests/virtual/gethtml-disabled/README.md
D third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/declarative-shadow-dom-repeats-expected.txt
D third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-expected.txt
D third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-ordering-expected.txt
D third_party/blink/web_tests/virtual/gethtml-disabled/shadow-dom/gethtml-use-counter-expected.txt
https://chromium-review.googlesource.com/5571638
Branch: main
commit 634acb107f2c0153aeda12dab3fde11aed869b2b
Author: Mason Freed <masonf@chromium.org>
Date: Tue May 28 16:37:51 2024
Remove the ElementGetHTML and DeclarativeShadowDOMSerializable flags
Both flags were shipped to stable in M125, and can now be safely
removed.
Bug: 41490936
Change-Id: I2fa5e85880e3066763867ec132d705cc115e29dc
Reviewed-on:
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1306818}
M third_party/blink/renderer/core/dom/container_node.cc
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.idl
M third_party/blink/renderer/core/dom/shadow_root.idl
M third_party/blink/renderer/core/dom/shadow_root_init.idl
M third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
M third_party/blink/renderer/core/html/html_template_element.idl
M third_party/blink/renderer/core/html/parser/html_construction_site.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
M third_party/blink/web_tests/TestExpectations
M third_party/blink/web_tests/VirtualTestSuites
D third_party/blink/web_tests/virtual/gethtml-disabled/README.md
D third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/declarative-shadow-dom-repeats-expected.txt
D third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-expected.txt
D third_party/blink/web_tests/virtual/gethtml-disabled/external/wpt/shadow-dom/declarative/gethtml-ordering-expected.txt
D third_party/blink/web_tests/virtual/gethtml-disabled/shadow-dom/gethtml-use-counter-expected.txt
Description
This needs a spec PR also.
The agreed behavior is:
(1) add an option to attachShadow() and <template shadowrootmode> to allow the shadow root to say "I opt in to serialization of this shadow root without providing a reference to me".
(2) provide a boolean option to getHTML() that says "please serialize opted-in shadow roots". The default for this option is false.
(3) provide an option to getHTML() containing a sequence of shadowRoots that should be serialized, independent of whether they opted in via the flag above.
In code:
element.attachShadow({serializable: true}); // (1)
// Or <template shadowrootmode serializable> // (1)
const html = element.getHTML({
includeShadowRoots: true, // (2)
shadowRoots: [shadowRoot1, shadowRoot2, ...] // (3)
});
// Examples
element.getHTML(); // does not serialize shadow roots
element.getHTML({includeShadowRoots: true}); // returns roots whose root.serializable is true
element.getHTML({shadowRoots: roots}); // also returns roots whose root.serializable is true
element.getHTML({includeShadowRoots: false, shadowRoots: roots}); // throws an exception
element.shadowRoot.serializable; // Returns boolean