This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { debounce } from 'common/Helpers'; | |
const dom = { | |
marquee: 'data-marquee-wrapper', | |
marqueeText: 'data-marquee-text', | |
}; | |
/** | |
* Build an animation for a marquee wrapper | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* If there are service workers available to us, then on window load we can register our worker | |
*/ | |
'serviceWorker' in navigator && window.addEventListener('load', () => { | |
navigator.serviceWorker.register('worker.js') | |
.then(() => { | |
// Registration was successful | |
console.log('ServiceWorker registration successful!'); | |
}, (err) => { | |
// registration failed :( |