Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1130859 of install

  • Revision slug: Web/Events/install
  • Revision title: install
  • Revision id: 1130859
  • Created:
  • Creator: fscholz
  • Is current revision? Yes
  • Comment bug 1280777

Revision Content

{{EventRef}}

The install event of the Web Manifest API is fired when the browser has successfully installed a page as an application.

Bubbles No
Cancelable No
Target objects {{domxref("Window")}}
Interface {{domxref("Event")}}

Examples

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

window.oninstall = handleInstall;

Inheritance

The install event implements the {{domxref("Event")}} interface — it has available the properties and methods defined on this interface.

Specifications

Specification Status Comment
{{SpecName('Manifest', '#dfn-install', 'install')}} {{Spec2('Web Speech API')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatUnknown}} {{CompatGeckoDesktop(49)}} [1] {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Feature Android Chrome Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} {{CompatUnknown}} {{CompatGeckoMobile(49)}} [1] {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

[1] This feature is behind a feature preference setting. In about:config, set dom.manifest.oninstall to true.

See also

  • The associated event handler, {{domxref("Window.oninstall")}}

Revision Source

<div>{{EventRef}}</div>

<div>
<p>The <strong><code>install</code></strong> event of the <a href="/en-US/docs/Web/Manifest">Web Manifest API</a> is fired when the browser has successfully installed a page as an application.</p>
</div>

<table class="properties">
 <tbody>
  <tr>
   <td>Bubbles</td>
   <td>No</td>
  </tr>
  <tr>
   <td>Cancelable</td>
   <td>No</td>
  </tr>
  <tr>
   <td>Target objects</td>
   <td>{{domxref("Window")}}</td>
  </tr>
  <tr>
   <td>Interface</td>
   <td>{{domxref("Event")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Examples">Examples</h2>

<pre class="brush: js">
function handleInstall(ev) {
  console.log('Thank you for installing our app!'); 
} 

window.oninstall = handleInstall;</pre>

<h2 id="Inheritance">Inheritance</h2>

<p>The <code>install</code> event implements the {{domxref("Event")}} interface — it has available the properties and methods defined on this interface.</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Manifest', '#dfn-install', 'install')}}</td>
   <td>{{Spec2('Web Speech API')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop(49)}} [1]</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Chrome</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoMobile(49)}} [1]</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<p>[1] This feature is behind a feature preference setting. In about:config, set <code>dom.manifest.oninstall</code> to <code>true</code>.</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>The associated event handler, {{domxref("Window.oninstall")}}</li>
</ul>
Revert to this revision