bug: Missing "beforetoggle" and "toggle" events on HTMLElement
#5963
Labels
Bug: Validated
This PR or Issue is verified to be a bug within Stencil
HTMLElement
#5963
Prerequisites
Stencil Version
4.21.0
Current Behavior
I cannot add an event handler for the
beforetoggle
ortoggle
events of anyHTMLElement
because they do not seem to be defined. See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforetoggle_event. I know the Popover API is relatively new in the DOM, but it is well supported at this point https://caniuse.com/mdn-api_htmlelement_popover.I get the error:
Expected Behavior
The
beforetoggle
andtoggle
events should be defined.System Info
Steps to Reproduce
A
render()
function like this will not work:I get the error:
Code Reproduction URL
https://github.com/nborelli/popover-pop-bug
Additional Information
Can work around by using a
ref
to get the reference to the element and then useaddEventListener()
The text was updated successfully, but these errors were encountered: