1
0
mirror of https://github.com/nolanlawson/pinafore synced 2025-02-01 14:26:45 +01:00

17 lines
604 B
JavaScript
Raw Normal View History

2018-01-27 16:31:26 -08:00
import {
importURLSearchParams,
importIntersectionObserver,
importRequestIdleCallback,
importIndexedDBGetAllShim,
importDialogPolyfill
} from './asyncModules'
export function loadPolyfills() {
return Promise.all([
typeof URLSearchParams === 'undefined' && importURLSearchParams(),
typeof IntersectionObserver === 'undefined' && importIntersectionObserver(),
typeof requestIdleCallback === 'undefined' && importRequestIdleCallback(),
!IDBObjectStore.prototype.getAll && importIndexedDBGetAllShim(),
typeof HTMLDialogElement === 'undefined' && importDialogPolyfill()
])
}