Skip to content

Commit 1eca429

Browse files
committed
Add attribute changed steps to dialog element
When the dialogs open attribute is removed: 1. Remove dialog from the document's open dialogs list. 2. Destroy and nullify dialog's close watcher This also adds an assertion to the start of 'set the dialog close watcher' that dialog's close watcher is null. # Conflicts: # source
1 parent 005b463 commit 1eca429

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

source

+35
Original file line numberDiff line numberDiff line change
@@ -62110,6 +62110,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
6211062110
element <var>dialog</var>:</p>
6211162111

6211262112
<ol>
62113+
<li><p><span>Assert</span>: <span>dialog</span>'s <span data-x="dialog-close-watcher">close
62114+
watcher</span> is null.</p></li>
62115+
6211362116
<li>
6211462117
<p>Set <var>dialog</var>'s <span data-x="dialog-close-watcher">close watcher</span> to the
6211562118
result of <span data-x="establish a close watcher">establishing a close watcher</span> given
@@ -62222,6 +62225,38 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
6222262225
<var>removedNode</var>'s <span>node document</span>'s <span>open dialogs list</span>.</p></li>
6222362226
</ol>
6222462227

62228+
<p>The following <span data-x="concept-element-attributes-change-ext">attribute change
62229+
steps</span>, given <var>element</var>, <var>localName</var>, <var>oldValue</var>,
62230+
<var>value</var>, and <var>namespace</var> are used for <code>dialog</code> elements:</p>
62231+
62232+
<ol>
62233+
<li><p>If <var>namespace</var> is not null, then return.</p></li>
62234+
62235+
<li><p>If <var>localName</var> is not <code data-x="attr-dialog-open">open</code>, then
62236+
return.</p></li>
62237+
62238+
<li><p>If <var>value</var> is null:</p>
62239+
62240+
<ol>
62241+
<li><p><span data-x="list remove">Remove</span> <var>element</var> from <var>element</var>'s
62242+
<span>node document</span>'s <span>open dialogs list</span>.</p></li>
62243+
62244+
<li>
62245+
<p>If <var>element</var>'s <span data-x="dialog-close-watcher">close watcher</span> is not
62246+
null, then:</p>
62247+
62248+
<ol>
62249+
<li><p><span data-x="close-watcher-destroy">Destroy</span> <var>element</var>'s <span
62250+
data-x="dialog-close-watcher">close watcher</span>.</p></li>
62251+
62252+
<li><p>Set <var>element</var>'s <span data-x="dialog-close-watcher">close watcher</span> to
62253+
null.</p></li>
62254+
</ol>
62255+
</li>
62256+
</ol>
62257+
</li>
62258+
</ol>
62259+
6222562260
<p>When a <code>dialog</code> element <var>subject</var> is to be <dfn data-x="close the
6222662261
dialog">closed</dfn>, with null or a string <var>result</var>, run these steps:</p>
6222762262

0 commit comments

Comments
 (0)