Created
January 8, 2017 21:39
-
-
Save pepelsbey/7491404491a6b06ff0fa5311ba021214 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function handleInstalled(ev) { | |
const date = new Date(ev.timeStamp / 1000); | |
console.log(`Ура! Наше приложение установили в ${date.toTimeString()}`); | |
} | |
// Используем атрибут IDL обработчика события | |
window.onappinstalled = handleInstalled; | |
// Используем .addEventListener() | |
window.addEventListener('appinstalled', handleInstalled); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment