1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-12 18:28:03 +01:00
Pinafore-Web-Client-Frontend/routes/_utils/loadPolyfills.js
2018-03-09 00:08:23 -08:00

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()
])
}