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