Web offline support
Jan 31, 2017
One minute read

Here I am using HubSpot/Offline. You can find more information at the Docs.

export const offlineCheck = (store) => {
    const { Offline } = (window as any)
    const upHandler = (e) => {console.log("upppp")}
    const downHandler = (e) => {console.log("downnnnn")}
    Offline.options = {
        checkOnLoad: true,
        checks: {
            image: {
                url: () => ("https://esri.github.io/offline-editor-js/tiny-image.png?_="
                    + (Math.floor(Math.random() * 1000000000)))
            },
            active: "image"
        }
    }
    Offline.on("up", upHandler)
    Offline.on("down", downHandler)
}

Back to posts


comments powered by Disqus