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.


window.oninstall = function(event) { ... };


function handleInstall(ev){
  console.log('Thank you for installing our app!');

window.oninstall = handleInstall;


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


© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.