1
- import * as abortSignalAbort from './abortsignal-abort.js'
2
1
import * as abortSignalTimeout from './abortsignal-timeout.js'
3
- import * as arrayAt from './arraylike-at.js'
4
2
import * as clipboardItem from './clipboarditem.js'
5
- import * as cryptoRandomUUID from './crypto-randomuuid.js'
6
3
import * as elementCheckVisibility from './element-checkvisibility.js'
7
- import * as eventAbortSignal from './event-abortsignal.js'
8
4
import * as navigatorClipboard from './navigator-clipboard.js'
9
- import * as formRequestSubmit from './form-requestsubmit.js'
10
- import * as objectHasOwn from './object-hasown.js'
11
5
import * as requestIdleCallback from './requestidlecallback.js'
12
- import * as arrayFindLast from './array-findlast.js'
13
- import * as arrayFindLastIndex from './array-findlastindex.js'
14
6
15
7
export const baseSupport =
16
- typeof Blob === 'function' &&
17
- typeof PerformanceObserver === 'function' &&
18
- typeof Intl === 'object' &&
19
- typeof MutationObserver === 'function' &&
20
- typeof URLSearchParams === 'function' &&
21
- typeof WebSocket === 'function' &&
22
- typeof IntersectionObserver === 'function' &&
23
- typeof queueMicrotask === 'function' &&
24
- typeof TextEncoder === 'function' &&
25
- typeof TextDecoder === 'function' &&
26
- typeof customElements === 'object' &&
27
- typeof HTMLDetailsElement === 'function' &&
28
- typeof AbortController === 'function' &&
29
- typeof AbortSignal === 'function' &&
30
8
typeof globalThis === 'object' &&
31
- 'entries' in FormData . prototype &&
32
- 'toggleAttribute' in Element . prototype &&
33
9
// ES2019
34
10
'fromEntries' in Object &&
35
11
'flatMap' in Array . prototype &&
@@ -41,32 +17,29 @@ export const baseSupport =
41
17
'replaceAll' in String . prototype &&
42
18
'any' in Promise &&
43
19
// ES2022
44
- // 'at' in String.prototype && // Polyfilled
45
- // 'at' in Array.prototype && // Polyfilled
46
- // 'hasOwn' in Object && // Polyfilled
20
+ 'at' in String . prototype &&
21
+ 'at' in Array . prototype &&
22
+ 'hasOwn' in Object &&
47
23
// ESNext
48
- // 'abort' in AbortSignal && // Polyfilled
24
+ 'abort' in AbortSignal &&
49
25
// 'timeout' in AbortSignal && // Polyfilled
26
+ // DOM / HTML and other specs
27
+ typeof queueMicrotask === 'function' &&
28
+ typeof HTMLDialogElement === 'function' &&
50
29
typeof AggregateError === 'function' &&
51
- // 'randomUUID' in crypto && // Polyfilled
30
+ typeof BroadcastChannel === 'function' &&
31
+ 'randomUUID' in crypto &&
52
32
'replaceChildren' in Element . prototype &&
33
+ 'requestSubmit' in HTMLFormElement . prototype &&
53
34
// 'requestIdleCallback' in window && // Polyfilled
54
35
true
55
36
56
37
export const polyfills = {
57
- abortSignalAbort,
58
38
abortSignalTimeout,
59
- arrayAt,
60
39
clipboardItem,
61
- cryptoRandomUUID,
62
40
elementCheckVisibility,
63
- eventAbortSignal,
64
41
navigatorClipboard,
65
- formRequestSubmit,
66
- objectHasOwn,
67
42
requestIdleCallback,
68
- arrayFindLast,
69
- arrayFindLastIndex,
70
43
}
71
44
72
45
export function isSupported ( ) {
0 commit comments