Skip to content

Commit 81acbc7

Browse files
committed
add popup target attributes example
1 parent 086e379 commit 81acbc7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

source

+24
Original file line numberDiff line numberDiff line change
@@ -81910,6 +81910,30 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
8191081910
data-x="attr-popup-show-target">popupshowtarget</code></dfn></p></li>
8191181911
</ul>
8191281912

81913+
<div class="example">
81914+
<p>The following shows how <code data-x="attr-popup-show-target">popupshowtarget</code> can be
81915+
used to open a pop-up:</p>
81916+
81917+
<pre><code class="html">&lt;div popup=auto id="foo">
81918+
This is a pop-up!
81919+
&lt;div>
81920+
81921+
&lt;button popupshowtarget="foo">
81922+
Show a pop-up
81923+
&lt;button></code></pre>
81924+
81925+
<p>The following shows how <code data-x="attr-popup-toggle-target">popuptoggletarget</code> can
81926+
open and close a manual pop-up, which can't be closed with light dismiss:</p>
81927+
81928+
<pre><code class="html">&lt;div popup=manual id="foo">
81929+
This is a pop-up!
81930+
&lt;div>
81931+
81932+
&lt;button popuptoggletarget="foo">
81933+
Show or hide a pop-up
81934+
&lt;button></code></pre>
81935+
</div>
81936+
8191381937
<p>The <span>pop-up target attributes</span> allow certain types of buttons to show and hide
8191481938
element with the <code data-x="attr-popup">popup</code> attribute.</p>
8191581939

0 commit comments

Comments
 (0)