1
0
mirror of https://github.com/nolanlawson/pinafore synced 2025-02-03 07:15:47 +01:00

23 lines
898 B
JavaScript
Raw Normal View History

2018-01-14 17:13:42 -08:00
import { init } from 'sapper/runtime.js'
2018-01-18 23:37:43 -08:00
import { offlineNotifiction } from '../routes/_utils/offlineNotification'
import { serviceWorkerClient } from '../routes/_utils/serviceWorkerClient'
2018-01-18 21:25:12 -08:00
2018-01-17 00:06:24 -08:00
import {
importURLSearchParams,
importIntersectionObserver,
2018-01-18 20:57:15 -08:00
importRequestIdleCallback,
importIndexedDBGetAllShim,
importDialogPolyfill
2018-01-17 00:06:24 -08:00
} from '../routes/_utils/asyncModules'
2018-01-06 15:51:25 -08:00
2018-01-07 23:00:15 -08:00
// polyfills
Promise.all([
typeof URLSearchParams === 'undefined' && importURLSearchParams(),
2018-01-17 00:06:24 -08:00
typeof IntersectionObserver === 'undefined' && importIntersectionObserver(),
2018-01-18 20:57:15 -08:00
typeof requestIdleCallback === 'undefined' && importRequestIdleCallback(),
!IDBObjectStore.prototype.getAll && importIndexedDBGetAllShim(),
typeof HTMLDialogElement === 'undefined' && importDialogPolyfill()
2018-01-07 23:00:15 -08:00
]).then(() => {
// `routes` is an array of route objects injected by Sapper
init(document.querySelector('#sapper'), __routes__)
2018-01-18 23:37:43 -08:00
})