Skip to content

Commit

Permalink
Make togglePopover throw more exceptions
Browse files Browse the repository at this point in the history
This PR makes sure that togglePopover will throw exceptions when it is
disconnected from the document or doesn't have a popover attribute.

Fixes whatwg#8999
  • Loading branch information
josepharhar committed Jun 21, 2023
1 parent 8430871 commit 032125c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -82726,6 +82726,19 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
<li><p>Otherwise, if <var>force</var> is not present or true, then run <span>show popover</span>
given <span>this</span> true, and null.</p></li>

<li>
<p>Otherwise:</p>

<ol>
<li><p>Let <var>expectedToBeShowing</var> be true if <span>this</span>'s <span>popover
visibility state</span> is <span data-x="popover-showing-state">showing</span>, otherwise
false.</p></li>

<li><p>Run <span>check popover validity</span> given <var>expectedToBeShowing</var>, true, and
null.</p></li>
</ol>
</li>

<li><p>Return true if <span>this</span>'s <span>popover visibility state</span> is <span
data-x="popover-showing-state">showing</span>; otherwise false.</p></li>
</ol>
Expand Down

0 comments on commit 032125c

Please sign in to comment.