2018-01-28 00:31:26 +00:00
|
|
|
import {
|
2018-12-15 10:06:12 +00:00
|
|
|
importCustomElementsPolyfill,
|
2018-12-14 06:55:04 +00:00
|
|
|
importIndexedDBGetAllShim,
|
2018-01-28 00:31:26 +00:00
|
|
|
importIntersectionObserver,
|
2019-09-21 06:17:52 +00:00
|
|
|
importIntl,
|
2019-08-04 20:31:51 +00:00
|
|
|
importRequestIdleCallback
|
2018-12-16 01:13:46 +00:00
|
|
|
} from './asyncPolyfills'
|
2018-01-28 00:31:26 +00:00
|
|
|
|
2018-02-09 06:29:29 +00:00
|
|
|
export function loadPolyfills () {
|
2018-01-28 00:31:26 +00:00
|
|
|
return Promise.all([
|
|
|
|
|
typeof IntersectionObserver === 'undefined' && importIntersectionObserver(),
|
|
|
|
|
typeof requestIdleCallback === 'undefined' && importRequestIdleCallback(),
|
2018-12-15 10:06:12 +00:00
|
|
|
!IDBObjectStore.prototype.getAll && importIndexedDBGetAllShim(),
|
2019-09-21 06:17:52 +00:00
|
|
|
typeof customElements === 'undefined' && importCustomElementsPolyfill(),
|
2020-05-19 04:11:13 +00:00
|
|
|
process.env.LEGACY && typeof Intl === 'undefined' && importIntl()
|
2018-01-28 00:31:26 +00:00
|
|
|
])
|
2018-02-09 06:29:29 +00:00
|
|
|
}
|