- From: Anne van Kesteren <notifications@github.com>
- Date: Mon, 23 Nov 2026 06:06:28 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1534@github.com>
HTML's selectedcontent element and SVG's use element clone a subtree and then remove elements from the copy. Cloning runs cloning steps and attribute change steps, and cloning a custom element enqueues an upgrade, so the elements that are removed afterwards can still fetch resources and run script.
The new excludeDescendant argument lets them leave such elements out of the copy instead. It applies to the descendants of the node being cloned, including those in clonable shadow trees, but not to the node itself or to template contents.
- [ ] At least two implementers are interested (and none opposed):
* WebKit: https://github.com/WebKit/WebKit/pull/81772
* …
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
* This only adds a hook. The selectedcontent change in HTML that uses it is tested by `html/semantics/forms/the-select-element/customizable-select/selectedcontent-does-not-clone-omitted-subtrees.html`, part of the WebKit PR above.
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
* Chromium: …
* Gecko: …
* WebKit: https://bugs.webkit.org/show_bug.cgi?id=332569
* Deno (only for aborting and events): N/A
* Node.js (only for aborting and events): N/A
- [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: N/A, no web developer-facing change by itself.
- [x] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use.
(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)
<!--
This comment and the below content is programmatically generated.
You may add a comma-separated list of anchors you'd like a
direct link to below (e.g. #idl-serializers, #idl-sequence):
Don't remove this comment or modify anything below this line.
If you don't want a preview generated for this pull request,
just replace the whole of this comment's content by "no preview"
and remove what's below.
-->
***
<a href="https://whatpr.org/dom/1534.html" title="Last updated on Nov 23, 2026, 2:06 PM UTC (c860c78)">Preview</a> | <a href="https://whatpr.org/dom/1534/e4f4f4f...c860c78.html" title="Last updated on Nov 23, 2026, 2:06 PM UTC (c860c78)">Diff</a>
You can view, comment on, or merge this pull request online at:
https://github.com/whatwg/dom/pull/1534
-- Commit Summary --
* Let callers of clone a node exclude descendants
-- File Changes --
M dom.bs (55)
-- Patch Links --
https://github.com/whatwg/dom/pull/1534.patch
https://github.com/whatwg/dom/pull/1534.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1534
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1534@github.com>
Received on Monday, 23 November 2026 14:06:33 UTC