We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6f7214 commit ee2ee4aCopy full SHA for ee2ee4a
1 file changed
src/js/popover-support.js
@@ -2,6 +2,12 @@
2
3
// If the popover element is detected in the browser, remove the no-popover class from the html tag.
4
5
-if (window.HTMLElement.prototype.hasOwnProperty('popover')) { // eslint-disable-line no-prototype-builtins
+const popoverSupport = () => {
6
+ return Object.hasOwn(window.HTMLElement.prototype, 'popover')
7
+}
8
+
9
+if (popoverSupport()) {
10
document.querySelector('html').classList.remove('no-popover')
11
}
12
13
+export { popoverSupport }
0 commit comments