Skip to content

Commit

Permalink
Fix dialog requestClose() to handle edge case
Browse files Browse the repository at this point in the history
Dialog requestClose() now directly calls close the dialog if dialog's close watcher is null.

This replaces a previous assert that's wrong.
  • Loading branch information
lukewarlow committed Feb 2, 2025
1 parent 005b463 commit 67f78ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -62087,8 +62087,8 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p>If <var>this</var> does not have an <code data-x="attr-dialog-open">open</code>
attribute, then return.</p></li>

<li><p><span>Assert</span>: <var>this</var>'s <span data-x="dialog-close-watcher">close
watcher</span> is not null.</p></li>
<li><p>If <var>this</var>'s <span data-x="dialog-close-watcher">close watcher</span> is null, then
<span>close the dialog</span> <span>this</span> with <var>returnValue</var> and return.</p></li>

<li><p>Set <var>dialog</var>'s <span>enable close watcher for <code
data-x="dom-dialog-requestClose">requestClose()</code></span> to true.</p></li>
Expand Down

0 comments on commit 67f78ff

Please sign in to comment.