- From: Anne van Kesteren <notifications@github.com>
- Date: Sat, 05 Dec 2026 04:52:20 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1535@github.com>
This converts the DOM Standard's algorithm declarations to the parameter-declaration style proposed in whatwg/infra#728:
* Each parameter's name comes before its type, which goes in parentheses.
* Default values use "with default".
* Parameters are introduced with "given", unless they're part of the algorithm's name.
* Declarations end in a colon instead of "run these steps".
For example, clone a node now reads:
> To clone a node given *node* (a node), *document* (a document) with default *node*'s node document, *subtree* (a boolean) with default false, *parent* (a node or null) with default null, *fallbackRegistry* (null or a CustomElementRegistry object) with default null, and *excludeDescendant* (null or an algorithm that takes a node and returns a boolean) with default null:
Call sites and algorithm steps are unchanged.
Judgment calls worth a look:
* "with" became "given" where it only introduced parameters: initialize, dispatch, insert, remove, replace data, split, get and set text content, queue a mutation record, and so on. It stays where it's part of the name: replace *child* with *node* within *parent*, replace all with … within …, string replace all with … within …, and replace an attribute … with ….
* "using" became "given" for create an event, create a dependent abort signal, locate a namespace, and locate a namespace prefix, although call sites still say "using".
* fire an event only lost ", run these steps". Its "with a description of how IDL attributes are to be initialized" needs a separate rethink.
* Where a parameter had no type, only the bare article was dropped (e.g., validate and extract). No types were invented.
* The activation behavior hook's parameter now has a name.
<!--
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/1535.html" title="Last updated on Dec 5, 2026, 12:52 PM UTC (e751d11)">Preview</a> | <a href="https://whatpr.org/dom/1535/708a199...e751d11.html" title="Last updated on Dec 5, 2026, 12:52 PM UTC (e751d11)">Diff</a>
You can view, comment on, or merge this pull request online at:
https://github.com/whatwg/dom/pull/1535
-- Commit Summary --
* Editorial: put parameter names before their types
-- File Changes --
M dom.bs (509)
-- Patch Links --
https://github.com/whatwg/dom/pull/1535.patch
https://github.com/whatwg/dom/pull/1535.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1535
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1535@github.com>
Received on Saturday, 5 December 2026 12:52:25 UTC