# Window: appinstalled event



The **`appinstalled`** event of the [Web Manifest API](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest) is fired when the browser has successfully installed a page as an application.

This event is not cancelable and does not bubble.

## Syntax

Use the event name in [addEventListener()](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget%2FaddEventListener):

```js-nolint
addEventListener("appinstalled", (event) => { })
```

Alternatively, assign to the [event handler property](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Events#using_onevent_properties) of the interface:

```js-nolint
onappinstalled = (event) => { }
```

## Event type

A generic [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event).

## Examples

You can use the `appinstalled` event in an [addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget%2FaddEventListener) method:

```js
window.addEventListener("appinstalled", () => {
  console.log("Thank you for installing our app!");
});
```

Or use the `onappinstalled` event handler property (but note that this replaces other event listeners added using `onappinstalled`, if any):

```js
window.onappinstalled = () => {
  console.log("Thank you for installing our app!");
};
```

## Specifications

## Browser compatibility
