[whatwg/dom] Factor out find a named element and rename a collection's nodes (PR #1493)

WIP. Companion to whatwg/html select/options algorithm sharing.


<!--
    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.
-->
***

### :boom: Error: 422 Unprocessable Entity :boom: ###

[PR Preview](https://github.com/tobie/pr-preview#pr-preview) failed to build. _(Last tried on Jul 12, 2026, 8:11 PM UTC)_.

<details>
<summary>More</summary>


PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

:rotating_light: [Spec Generator](https://www.w3.org/publications/spec-generator/) - Spec Generator is the web service used to build bikeshed/ReSpec specs

:link: [Related URL](https://www.w3.org/publications/spec-generator/?type=bikeshed-spec&output=html&url=https%3A%2F%2Fraw.githubusercontent.com%2Fwhatwg%2Fdom%2F16c2d7d1041c53f97e9f106662ef871ef4541f9c%2Fdom.bs&force=1&md-status=LS-PR&md-Text-Macro=PR-NUMBER%201493)

**Error output:**

```json
[
    {
        "lineNum": "2887:63",
        "messageType": "link",
        "text": "Multiple possible 'dfn' local refs for 'nodes'.\nRandomly chose one of them; other instances might get a different random choice."
    },
    {
        "lineNum": null,
        "messageType": "failure",
        "text": "Did not generate, due to errors exceeding the allowed error level."
    }
]
```

_This seems to be an issue with the [Spec Generator](https://www.w3.org/publications/spec-generator/) service. PR Preview doesn't manage this service and so has no control over it. If you've identified an issue with it, you can [report the issue to the maintainers of Spec Generator](https://github.com/w3c/spec-generator/issues/new) directly. Please be courteous. Thank you!_

_If you don't have enough information above to solve the error by yourself or if the issue doesn't seem related to Spec Generator, you can [file an issue with PR Preview](https://github.com/tobie/pr-preview/issues/new?title=Unidentified%20Error&body=See%20whatwg/dom%231493.)._

</details>

You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/dom/pull/1493

-- Commit Summary --

  * Factor out find a named element and rename a collection's nodes

-- File Changes --

    M dom.bs (63)

-- Patch Links --

https://github.com/whatwg/dom/pull/1493.patch
https://github.com/whatwg/dom/pull/1493.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1493
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1493@github.com>

Received on Sunday, 12 July 2026 20:11:24 UTC