This enables individual control over whether a shadow root is clonable (via standard platform cloning commands such as `cloneNode()`). Imperative shadow roots can now be controlled via a parameter to `attachShadow({clonable:true})`. Declarative shadow roots can be controlled via a new attribute, `<template shadowrootmode=open shadowrootclonable>`.
This is a slight change in behavior, which poses a very small compat risk. Prior to this feature, declarative shadow roots within `<template>` elements would get automatically cloned. With the change, only shadow roots that are explicitly set to `clonable` will be cloned. I believe the usage of the "inside-template" behavior before was minimal, so the risk should be low. Safari already shipped the new behavior, reducing the risk. I plan to enable this functionality slowly and monitor for breakage and bug reports.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
https://wpt.fyi/results/shadow-dom/shadow-root-clonable.html
Shipping on desktop | 124 |
Shipping on Android | 124 |
Shipping on WebView | 124 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneLGTM1 to ship (see below).
On 2/15/24 6:12 PM, Mason Freed wrote:
Contact emails
mas...@chromium.org
Explainer
None
Specification
https://dom.spec.whatwg.org/#shadowroot-clonable
Summary
This enables individual control over whether a shadow root is clonable (via standard platform cloning commands such as `cloneNode()`). Imperative shadow roots can now be controlled via a parameter to `attachShadow({clonable:true})`. Declarative shadow roots can be controlled via a new attribute, `<template shadowrootmode=open shadowrootclonable>`.
Blink component
Blink>DOM>ShadowDOM
Search tags
declarative shadow dom
TAG review
None
TAG review status
Not applicable
Risks
Interoperability and Compatibility
This is a slight change in behavior, which poses a very small compat risk. Prior to this feature, declarative shadow roots within `<template>` elements would get automatically cloned. With the change, only shadow roots that are explicitly set to `clonable` will be cloned. I believe the usage of the "inside-template" behavior before was minimal, so the risk should be low. Safari already shipped the new behavior, reducing the risk. I plan to enable this functionality slowly and monitor for breakage and bug reports.
...but this has also been in Firefox Nightly and Beta, shipping
to Stable in 123 (on Feb 20). Obvious breakage tends to
surface in Firefox Nightly pretty quickly. Mozilla shipping 2
months before us will also allow us to get a sense of possible
breakage before we hit the stable channel.
I think the risk is non-zero, but likely very, very low - so thanks for rolling this out slowly and being willing to turn it off if you discover significant issues that can't be quickly resolved via outreach.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDjeNTzKD%3DMpiPbi64%2BEq97vnAA1Q%2BfMG--iFCG8N%3DSa9Q%40mail.gmail.com.
LGTM1 to ship (see below).
It looks like Safari has only shipped to Beta...
...but this has also been in Firefox Nightly and Beta, shipping to Stable in 123 (on Feb 20). Obvious breakage tends to surface in Firefox Nightly pretty quickly. Mozilla shipping 2 months before us will also allow us to get a sense of possible breakage before we hit the stable channel.
I think the risk is non-zero, but likely very, very low - so thanks for rolling this out slowly and being willing to turn it off if you discover significant issues that can't be quickly resolved via outreach.
>> send an email to blink-dev+unsubscribe@chromium.org
>> <mailto:blink-dev+unsubscribe@chromium.org>.
>> To view this discussion on the web visit
>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDjeNTzKD%3DMpiPbi64%2BEq97vnAA1Q%2BfMG--iFCG8N%3DSa9Q%40mail.gmail.com <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDjeNTzKD%3DMpiPbi64%2BEq97vnAA1Q%2BfMG--iFCG8N%3DSa9Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+unsubscribe@chromium.org
> <mailto:blink-dev+unsubscribe@chromium.org>.
LGTM3
>> send an email to blink-dev+...@chromium.org
>> <mailto:blink-dev+...@chromium.org>.
>> To view this discussion on the web visit
>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDjeNTzKD%3DMpiPbi64%2BEq97vnAA1Q%2BfMG--iFCG8N%3DSa9Q%40mail.gmail.com <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDjeNTzKD%3DMpiPbi64%2BEq97vnAA1Q%2BfMG--iFCG8N%3DSa9Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.