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

16 lines
510 B
JavaScript
Raw Normal View History

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