Skip to content

Commit 21886e7

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.
1 parent d2148b9 commit 21886e7

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

source

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61801,6 +61801,37 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
6180161801
data-x="attr-hidden">hidden</code> attribute to hide it.</p>
6180261802
</div>
6180361803

61804+
<p>The following <span data-x="concept-element-attributes-change-ext">attribute change
61805+
steps</span>, given <var>element</var>, <var>localName</var>, <var>oldValue</var>,
61806+
<var>value</var>, and <var>namespace</var> are used for <code>dialog</code> elements:</p>
61807+
61808+
<ol>
61809+
<li><p>If <var>namespace</var> is not null, then return.</p></li>
61810+
61811+
<li><p>If <var>localName</var> is not <code data-x="attr-dialog-open">open</code>, then
61812+
return.</p></li>
61813+
61814+
<li><p>If <var>value</var> is null:</p>
61815+
61816+
<ol>
61817+
<li><p><span data-x="list remove">Remove</span> <var>element</var> from <var>element</var>'s
61818+
<span>node document</span>'s <span>open dialogs list</span>.</p></li>
61819+
61820+
<li><p>If <var>element</var>'s <span data-x="dialog-close-watcher">close watcher</span> is
61821+
not null, then:</p>
61822+
61823+
<ol>
61824+
<li><p><span data-x="close-watcher-destroy">Destroy</span> <var>element</var>'s <span
61825+
data-x="dialog-close-watcher">close watcher</span>.</p></li>
61826+
61827+
<li><p>Set <var>element</var>'s <span data-x="dialog-close-watcher">close watcher</span> to
61828+
null.</p></li>
61829+
</ol>
61830+
</li>
61831+
</ol>
61832+
</li>
61833+
</ol>
61834+
6180461835
<p>The <code data-x="attr-tabindex">tabindex</code> attribute must not be specified on
6180561836
<code>dialog</code> elements.</p>
6180661837

@@ -62051,6 +62082,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
6205162082
element <var>dialog</var>:</p>
6205262083

6205362084
<ol>
62085+
<li><p><span>Assert</span>: <span>dialog</span>'s <span data-x="dialog-close-watcher">close
62086+
watcher</span> is null.</p></li>
62087+
6205462088
<li>
6205562089
<p>Set <var>dialog</var>'s <span data-x="dialog-close-watcher">close watcher</span> to the
6205662090
result of <span data-x="establish a close watcher">establishing a close watcher</span> given

0 commit comments

Comments
 (0)