Skip to content

Commit c85fb47

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 0b5dd5e commit c85fb47

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Diff for: source

+35
Original file line numberDiff line numberDiff line change
@@ -62084,6 +62084,38 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
6208462084
<var>removedNode</var>'s <span>node document</span>'s <span>open dialogs list</span>.</p></li>
6208562085
</ol>
6208662086

62087+
<p>The following <span data-x="concept-element-attributes-change-ext">attribute change
62088+
steps</span>, given <var>element</var>, <var>localName</var>, <var>oldValue</var>,
62089+
<var>value</var>, and <var>namespace</var> are used for <code>dialog</code> elements:</p>
62090+
62091+
<ol>
62092+
<li><p>If <var>namespace</var> is not null, then return.</p></li>
62093+
62094+
<li><p>If <var>localName</var> is not <code data-x="attr-dialog-open">open</code>, then
62095+
return.</p></li>
62096+
62097+
<li><p>If <var>value</var> is null:</p>
62098+
62099+
<ol>
62100+
<li><p><span data-x="list remove">Remove</span> <var>element</var> from <var>element</var>'s
62101+
<span>node document</span>'s <span>open dialogs list</span>.</p></li>
62102+
62103+
<li>
62104+
<p>If <var>element</var>'s <span data-x="dialog-close-watcher">close watcher</span> is not
62105+
null, then:</p>
62106+
62107+
<ol>
62108+
<li><p><span data-x="close-watcher-destroy">Destroy</span> <var>element</var>'s <span
62109+
data-x="dialog-close-watcher">close watcher</span>.</p></li>
62110+
62111+
<li><p>Set <var>element</var>'s <span data-x="dialog-close-watcher">close watcher</span> to
62112+
null.</p></li>
62113+
</ol>
62114+
</li>
62115+
</ol>
62116+
</li>
62117+
</ol>
62118+
6208762119
<p>To <dfn>show a modal dialog</dfn> given a <code>dialog</code> element <var>subject</var>:</p>
6208862120

6208962121
<ol>
@@ -62178,6 +62210,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
6217862210
element <var>dialog</var>:</p>
6217962211

6218062212
<ol>
62213+
<li><p><span>Assert</span>: <span>dialog</span>'s <span data-x="dialog-close-watcher">close
62214+
watcher</span> is null.</p></li>
62215+
6218162216
<li>
6218262217
<p>Set <var>dialog</var>'s <span data-x="dialog-close-watcher">close watcher</span> to the
6218362218
result of <span data-x="establish a close watcher">establishing a close watcher</span> given

0 commit comments

Comments
 (0)