forked from cybrespace/pinafore
14 lines
414 B
JavaScript
14 lines
414 B
JavaScript
import {
|
|
importIntersectionObserver,
|
|
importRequestIdleCallback,
|
|
importIndexedDBGetAllShim
|
|
} from './asyncModules'
|
|
|
|
export function loadPolyfills () {
|
|
return Promise.all([
|
|
typeof IntersectionObserver === 'undefined' && importIntersectionObserver(),
|
|
typeof requestIdleCallback === 'undefined' && importRequestIdleCallback(),
|
|
!IDBObjectStore.prototype.getAll && importIndexedDBGetAllShim()
|
|
])
|
|
}
|