Skip to content

Commit

Permalink
Popover: throw exception in originalType check
Browse files Browse the repository at this point in the history
Since exception throwing was moved into "check popover validity," we need to explicitly throw an exception for this originalType check in order to make sure that it actually throws an exception like it is supposed to.

Fixes #9037.
  • Loading branch information
josepharhar authored May 26, 2023
1 parent 795d288 commit 1a7826b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -82339,11 +82339,13 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
<li><p>Run <span data-x="hide-all-popovers-until">hide all popovers until</span> given
<var>ancestor</var>, false, and true.</p></li>

<li><p>If <var>originalType</var> is not equal to the value of <var>element</var>'s <code
data-x="attr-popover">popover</code> attribute, then throw a
<span>"<code>InvalidStateError</code>"</span> <code>DOMException</code>.</p></li>

<li>
<p>If <var>originalType</var> is not equal to the value of <var>element</var>'s <code
data-x="attr-popover">popover</code> attribute, or if the result of running <span>check
popover validity</span> given <var>element</var>, false, <var>throwExceptions</var>, and
<var>document</var> is false, then return.</p>
<p>If the result of running <span>check popover validity</span> given <var>element</var>,
false, <var>throwExceptions</var>, and <var>document</var> is false, then return.</p>

<p class="note"><span>Check popover validity</span> is called again because running <span
data-x="hide-all-popovers-until">hide all popovers until</span> above could have fired the
Expand Down

0 comments on commit 1a7826b

Please sign in to comment.