Polyfills the HTML popover attribute and showPopover/hidePopover/togglePopover methods onto HTMLElement, as well as the popovertarget and popovertargetaction attributes on <button> elements.
To demonstrate this, you can see this in action if you go to the demo in a browser that doesn't natively implement popover, and in the console execute:
document.querySelector(null);
This causes some interop issues with other 3rd party libraries.
Expected behavior
document.querySelector does not throw an error, and returns null.
To demonstrate this, you can see this in action if you go to the demo in a browser that doesn't natively implement popover, and in the console execute:
This causes some interop issues with other 3rd party libraries.
Expected behavior
document.querySelector
does not throw an error, and returns null.Actual behavior
Error thrown: Uncaught TypeError: can't access property "includes", selector is null
Firefox: