@@ -45686,7 +45686,8 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
45686
45686
45687
45687
// <a href="#HTMLInputElement-partial">also has obsolete members</a>
45688
45688
};
45689
- <span>HTMLInputElement</span> includes <span>PopoverInvokerElement</span>;</code></pre>
45689
+ <span>HTMLInputElement</span> includes <span>PopoverInvokerElement</span>;
45690
+ <span>HTMLInputElement</span> includes <span>DialogInvokerElement</span>;</code></pre>
45690
45691
</dd>
45691
45692
<dd w-dev>Uses <code>HTMLInputElement</code>.</dd>
45692
45693
</dl>
@@ -52101,7 +52102,8 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
52101
52102
52102
52103
readonly attribute <span>NodeList</span> <span data-x="dom-lfe-labels">labels</span>;
52103
52104
};
52104
- <span>HTMLButtonElement</span> includes <span>PopoverInvokerElement</span>;</code></pre>
52105
+ <span>HTMLButtonElement</span> includes <span>PopoverInvokerElement</span>;
52106
+ <span>HTMLButtonElement</span> includes <span>DialogInvokerElement</span>;</code></pre>
52105
52107
</dd>
52106
52108
<dd w-dev>Uses <code>HTMLButtonElement</code>.</dd>
52107
52109
</dl>
@@ -60337,6 +60339,86 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
60337
60339
</dialog></code></pre>
60338
60340
</div>
60339
60341
60342
+ <h4 id="the-dialogmodal-target-attributes">The dialogmodal target attributes</h4>
60343
+
60344
+ <p><span data-x="concept-button">Buttons</span> may have the following content attributes:</p>
60345
+
60346
+ <ul>
60347
+ <li><p><dfn element-attr for="html-global"><code
60348
+ data-x="attr-dialogmodaltarget">dialogmoddaltarget</code></dfn></p></li>
60349
+ </ul>
60350
+
60351
+ <p>If specified, the <code data-x="attr-dialogmodaltarget">dialogmodaltarget</code> attribute value must
60352
+ be the <span data-x="concept-ID">ID</span> of a <span data-x="dialog">dialog</span> element
60353
+ in the same <span>tree</span> as the <span data-x="concept-button">button</span> with the
60354
+ <code data-x="attr-dialogmodaltarget">dialogmodaltarget</code> attribute.</p>
60355
+
60356
+ <div class="example">
60357
+ <p>The following shows how the <code data-x="attr-dialogmodaltarget">dialogmodaltarget</code> attribute
60358
+ can be used to show and close a dialog:</p>
60359
+
60360
+ <pre><code class="html"><button dialogmodaltarget="foo">
60361
+ Show a dialog (modal)
60362
+ </button>
60363
+
60364
+ <dialog id="foo">
60365
+ This is a dialog!
60366
+ <button dialogmodaltarget="foo">Close</button>
60367
+ </article></code></pre>
60368
+ </div>
60369
+
60370
+ <span data-x="concept-element-dom">DOM interface</span>:
60371
+ <pre><code class="idl">interface mixin <dfn interface>DialogInvokerElement</dfn> {
60372
+ [<span>CEReactions</span>] attribute Element? <span data-x="dom-dialogModalTargetElement">dialogModalTargetElement</span>;
60373
+ };</code></pre>
60374
+
60375
+ <p>The <dfn attribute for="HTMLElement"><code
60376
+ data-x="dom-dialogModalTargetElement">dialogModalTargetElement</code></dfn> IDL attribute must
60377
+ <span>reflect</span> the <code data-x="attr-dialogmodaltarget">dialogmodaltarget</code> attribute.</p>
60378
+
60379
+ <p>To run the <dfn>dialog modal target attribute activation behavior</dfn> given a <code>Node</code>
60380
+ <var>node</var>:</p>
60381
+
60382
+ <ol>
60383
+ <li><p>Let <var>dialog</var> be <var>node</var>'s <span>dialog modal target element</span>.</p></li>
60384
+
60385
+ <li><p>If <var>dialog</var> is null, then return.</p></li>
60386
+
60387
+ <li><p>If the <code data-x="attr-dialog-open">open</code> attribute is set on <var>node</var>
60388
+ then:
60389
+
60390
+ <ol>
60391
+ <li><p>Run <code data-x="dom-dialog-close">close()</code></p> on <var>node</var></li>
60392
+ <li><p>Otherwise, run <code data-x="dom-dialog-showmodal">showModal()</code> on <var>node</var></li>
60393
+ </ol>
60394
+
60395
+ </li>
60396
+ </ol>
60397
+
60398
+ <p>To get the <dfn>dialog modal target element</dfn> given a <code>Node</code> <var>node</var>, perform
60399
+ the following steps. They return an <span data-x="HTML elements">HTML element</span> or null.</p>
60400
+
60401
+ <ol>
60402
+ <li><p>If <var>node</var> is not a <span data-x="concept-button">button</span>, then return
60403
+ null.</p></li>
60404
+
60405
+ <li><p>If <var>node</var> is <span data-x="concept-fe-disabled">disabled</span>, then return
60406
+ null.</p></li>
60407
+
60408
+ <li><p>If <var>node</var> has a <span>form owner</span> and <var>node</var> is a <span
60409
+ data-x="concept-submit-button">submit button</span>, then return null.</p></li>
60410
+
60411
+ <li><p>Let <var>dialogElement</var> be <var>node</var>'s <span data-x="attr-associated
60412
+ element"><code data-x="">dialogmodaltarget</code>-associated element</span>.</p></li>
60413
+
60414
+ <li><p>If <var>dialogElement</var> is null, then return null.</p></li>
60415
+
60416
+ <li><p>If <var>dialogElement</var> is not a <code data-x="dialog">dialog</code> element, then return null.</p></li>
60417
+
60418
+ <li><p>Return <var>dialogElement</var>.</p></li>
60419
+ </ol>
60420
+
60421
+
60340
60422
60341
60423
60342
60424
@@ -60365,7 +60447,6 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
60365
60447
60366
60448
</div>
60367
60449
60368
-
60369
60450
<h4 id="the-script-element">The <dfn
60370
60451
id="script" element><code>script</code></dfn> element</h4>
60371
60452
0 commit comments