pinafore/routes/_utils/loadPolyfills.js
Nolan Lawson fd43dc6e5d
fix idb getall in edge (#535)
* fix idb getall in edge

fixes #532

* try to fix

* this should work

* fixup
2018-09-05 19:52:51 -07:00

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