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