Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add before removing steps #1185

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2754,10 +2754,11 @@ within a <var>parent</var>, run these steps:
</ol>


<p><a lt="Other applicable specifications">Specifications</a> may define
<dfn export id=concept-node-remove-ext>removing steps</dfn> for all or some <a for=/>nodes</a>. The
algorithm is passed <var ignore>removedNode</var>, and optionally <var ignore>oldParent</var>, as
indicated in the <a for=/>remove</a> algorithm below.
<p><a lt="Other applicable specifications">Specifications</a> may define <dfn export
id=concept-node-remove-ext>removing steps</dfn> and <dfn export
id=concept-node-before-remove-ext>before removing steps</dfn> for all or some <a for=/>nodes</a>.
These algorithms are passed <var ignore>removedNode</var>, and optionally <var
ignore>oldParent</var>, as indicated in the <a for=/>remove</a> algorithm below.

<p>To <dfn export id=concept-node-remove>remove</dfn> a <var>node</var>, with an optional
<i>suppress observers flag</i>, run these steps:
Expand All @@ -2767,6 +2768,12 @@ indicated in the <a for=/>remove</a> algorithm below.

<li><p>Assert: <var>parent</var> is non-null.

<li><p>Run the <a>before removing steps</a> with <var>node</var> and <var>parent</var>.

<li><p>For each <a>shadow-including descendant</a> <var>descendant</var> of <var>node</var>, in
<a>shadow-including tree order</a>, run the <a>before removing steps</a> with
<var>descendant</var>.</p></li>

<li><p>Let <var>index</var> be <var>node</var>'s <a for=tree>index</a>.

<li><p>For each <a>live range</a> whose <a for=range>start node</a> is an
Expand Down