Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support opening dialog modals without automatic closing behaviour #10593

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -61240,14 +61240,20 @@ interface <dfn interface>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
<dd><a href="https://w3c.github.io/html-aam/#el-dialog">For implementers</a>.</dd>
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
<dd w-nodev>
<pre><code class="idl">[Exposed=Window]
<pre><code class="idl">enum <dfn enum>DialogCloseBehavior</dfn> { "<dfn subdfn data-x="dom-DialogCloseBehavior-auto">auto</dfn>", "<dfn subdfn data-x="dom-DialogCloseBehavior-manual">manual</dfn>" };

dictionary <dfn dictionary>DialogShowOptions</dfn> {
<span data-x="DialogCloseBehavior">DialogCloseBehavior</span> <dfn dict-member for="DialogShowOptions" data-x="dom-DialogShowOptions-closeBehavior">closeBehavior</dfn> = "auto";
};

[Exposed=Window]
interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
[<span>HTMLConstructor</span>] constructor();

[<span>CEReactions</span>] attribute boolean <span data-x="dom-dialog-open">open</span>;
attribute DOMString <span data-x="dom-dialog-returnValue">returnValue</span>;
[<span>CEReactions</span>] undefined <span data-x="dom-dialog-show">show</span>();
[<span>CEReactions</span>] undefined <span data-x="dom-dialog-showModal">showModal</span>();
[<span>CEReactions</span>] undefined <span data-x="dom-dialog-showModal">showModal</span>(optional <span data-x="DialogShowOptions">DialogShowOptions</span> options = {});
[<span>CEReactions</span>] undefined <span data-x="dom-dialog-close">close</span>(optional DOMString returnValue);
};</code></pre>
</dd>
Expand Down Expand Up @@ -61434,7 +61440,7 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
</ol>

<p>The <dfn method for="HTMLDialogElement"><code
data-x="dom-dialog-showModal">showModal()</code></dfn> method steps are:</p>
data-x="dom-dialog-showModal">showModal(<var>options</var>)</code></dfn> method steps are:</p>

<ol>
<li><p>If <span>this</span> has an <code data-x="attr-dialog-open">open</code> attribute and the
Expand Down Expand Up @@ -61472,8 +61478,10 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
to the top layer</span> given <span>this</span>.</p></li>

<li id="canceling-dialogs">
<p>Set <span>this</span>'s <span data-x="dialog-close-watcher">close watcher</span> to the
result of <span data-x="establish a close watcher">establishing a close watcher</span> given
<p>If <var>options</var>'s <span data-x="dom-DialogShowOptions-closeBehavior"
>closeBehavior</span> is "<span data-x="dom-DialogCloseBehavior-auto">auto</span>", set
<span>this</span>'s <span data-x="dialog-close-watcher">close watcher</span> to the result of
<span data-x="establish a close watcher">establishing a close watcher</span> given
<span>this</span>'s <span>relevant global object</span>, with:</p>

<ul>
Expand Down