File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ import * as elementCheckVisibility from './element-checkvisibility.js'
4
4
import * as navigatorClipboard from './navigator-clipboard.js'
5
5
import * as requestIdleCallback from './requestidlecallback.js'
6
6
7
+ let supportsModalPseudo = false
8
+ try {
9
+ // This will error in older browsers
10
+ supportsModalPseudo = document . body . matches ( ':modal' ) === false
11
+ } catch {
12
+ supportsModalPseudo = false
13
+ }
14
+
7
15
export const baseSupport =
8
16
typeof globalThis === 'object' &&
9
17
// ES2019
@@ -26,6 +34,7 @@ export const baseSupport =
26
34
// DOM / HTML and other specs
27
35
typeof queueMicrotask === 'function' &&
28
36
typeof HTMLDialogElement === 'function' &&
37
+ supportsModalPseudo &&
29
38
typeof AggregateError === 'function' &&
30
39
typeof BroadcastChannel === 'function' &&
31
40
'randomUUID' in crypto &&
You can’t perform that action at this time.
0 commit comments