Window.oninstall
The oninstall
property of the Window
interface represent the event handler for the install
event, which is thrown each time the page is successfully installed as a web app.
Syntax
JavaScript
Copy Code
window.oninstall = function(event) { ... };
Example
JavaScript
Copy Code
function handleInstall(ev){ console.log('Thank you for installing our app!'); } window.oninstall = handleInstall;
Specifications
Specification | Status | Comment |
---|---|---|
Web App Manifest The definition of 'Window.oninstall' in that specification. |
Working Draft | Initial specification. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | ? | 49 (49) | ? | ? | ? |
Feature | Android | Android Webview | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | ? | ? | 49.0 (49) | ? | ? | ? | ? |
See also
License
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/window/oninstall