2018-01-28 00:31:26 +00:00
|
|
|
import {
|
|
|
|
importURLSearchParams,
|
|
|
|
importIntersectionObserver,
|
|
|
|
importRequestIdleCallback,
|
2018-02-09 06:29:29 +00:00
|
|
|
importIndexedDBGetAllShim
|
2018-01-28 00:31:26 +00:00
|
|
|
} from './asyncModules'
|
|
|
|
|
2018-02-09 06:29:29 +00:00
|
|
|
export function loadPolyfills () {
|
2018-01-28 00:31:26 +00:00
|
|
|
return Promise.all([
|
|
|
|
typeof URLSearchParams === 'undefined' && importURLSearchParams(),
|
|
|
|
typeof IntersectionObserver === 'undefined' && importIntersectionObserver(),
|
|
|
|
typeof requestIdleCallback === 'undefined' && importRequestIdleCallback(),
|
2018-02-05 03:15:35 +00:00
|
|
|
!IDBObjectStore.prototype.getAll && importIndexedDBGetAllShim()
|
2018-01-28 00:31:26 +00:00
|
|
|
])
|
2018-02-09 06:29:29 +00:00
|
|
|
}
|