whatwg / html

HTML Standard

Home Page:https://html.spec.whatwg.org/multipage/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show popover 11.5 ignores throwExceptions

lukewarlow opened this issue · comments

What is the issue with the HTML Standard?

Step 11.5 in https://html.spec.whatwg.org/multipage/popover.html#show-popover can throw an exception, this happens regardless of the throwExceptions argument to the algorithm.

Is this intentional or should it be changed to just return when throwExceptions is false?

In case the number changes 11.5 is If originalType is not equal to the value of element's popover attribute, then throw a "InvalidStateError" DOMException.

Whoops, there should be a check for throwExceptions there. The chromium implementation checks for throwExceptions here: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_element.cc;l=1534-1540;drc=f83b758b5980e3fb3eafa11bab38116206907459

I'll make a spec edit

I made a PR here: #10473