Skip to content

Commit 7a8406b

Browse files
annevkdomenic
authored andcommitted
Remove compound microtasks
Complements whatwg/html#4437. Also clarify which agent the mutation observer microtask queued member is obtained from. Fixes #734.
1 parent edf65bf commit 7a8406b

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

dom.bs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,7 +2287,7 @@ steps:
22872287
<li><p><a for=set>Append</a> <var>slot</var> to <var>slot</var>'s <a>relevant agent</a>'s
22882288
<a>signal slots</a>.
22892289

2290-
<li><p><a>Queue a mutation observer compound microtask</a>.
2290+
<li><p><a>Queue a mutation observer microtask</a>.
22912291
</ol>
22922292

22932293

@@ -3260,28 +3260,30 @@ invoked, must run these steps:
32603260
<h3 id=mutation-observers>Mutation observers</h3>
32613261

32623262
<p>Each <a>similar-origin window agent</a> has a
3263-
<dfn noexport>mutation observer compound microtask queued flag</dfn>, which is initially unset.
3264-
[[!HTML]]
3263+
<dfn noexport id=mutation-observer-compound-microtask-queued-flag>mutation observer microtask queued</dfn>
3264+
(a boolean), which is initially false. [[!HTML]]
32653265

32663266
<p>Each <a>similar-origin window agent</a> also has
32673267
<dfn noexport id=mutation-observer-list>mutation observers</dfn> (a <a for=/>set</a> of zero or more
32683268
{{MutationObserver}} objects), which is initially empty.
32693269

3270-
<p>To <dfn export>queue a mutation observer compound microtask</dfn>, run these steps:
3270+
<p>To
3271+
<dfn noexport id=queue-a-mutation-observer-compound-microtask>queue a mutation observer microtask</dfn>,
3272+
run these steps:
32713273

32723274
<ol>
3273-
<li><p>If <a>mutation observer compound microtask queued flag</a> is set, then return.
3275+
<li><p>If the <a>surrounding agent</a>'s <a>mutation observer microtask queued</a> is true, then
3276+
return.
32743277

3275-
<li><p>Set <a>mutation observer compound microtask queued flag</a>.
3278+
<li><p>Set the <a>surrounding agent</a>'s <a>mutation observer microtask queued</a> to true.
32763279

3277-
<li><p><a lt="queue a microtask">Queue</a> a <a>compound microtask</a> to
3278-
<a>notify mutation observers</a>.
3280+
<li><p><a lt="queue a microtask">Queue</a> a <a>microtask</a> to <a>notify mutation observers</a>.
32793281
</ol>
32803282

32813283
<p>To <dfn export>notify mutation observers</dfn>, run these steps:
32823284

32833285
<ol>
3284-
<li><p>Unset <a>mutation observer compound microtask queued flag</a>.
3286+
<li><p>Set the <a>surrounding agent</a>'s <a>mutation observer microtask queued</a> to false.
32853287

32863288
<li><p>Let <var>notifySet</var> be a <a for=set>clone</a> of the <a>surrounding agent</a>'s
32873289
<a>mutation observers</a>.
@@ -3292,8 +3294,7 @@ invoked, must run these steps:
32923294
<li><p><a for=set>Empty</a> the <a>surrounding agent</a>'s <a>signal slots</a>.
32933295

32943296
<li>
3295-
<p><a for=set>For each</a> <var>mo</var> of <var>notifySet</var>,
3296-
<a>execute a compound microtask subtask</a> to run these steps: [[!HTML]]
3297+
<p><a for=set>For each</a> <var>mo</var> of <var>notifySet</var>:
32973298

32983299
<ol>
32993300
<li><p>Let <var>records</var> be a <a for=queue>clone</a> of <var>mo</var>'s
@@ -3620,7 +3621,7 @@ run these steps:
36203621
<a for=MutationObserver>record queue</a>.
36213622
</ol>
36223623

3623-
<li><p><a>Queue a mutation observer compound microtask</a>.
3624+
<li><p><a>Queue a mutation observer microtask</a>.
36243625
</ol>
36253626

36263627
<p>To <dfn noexport>queue a tree mutation record</dfn> for <var>target</var> with

0 commit comments

Comments
 (0)