Skip to content

Commit

Permalink
docs: minor updates to PWA docs (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier authored Sep 7, 2021
1 parent 91567ed commit d38be02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/pwa/pwa.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The App Platform provides some tools that can enable some PWA features and offli

### Opting In

You can opt in to PWA features using options in `d2.config.json`. Here are the options and their effects:
You can opt in to PWA features using options in `d2.config.js`. Here are the options and their effects:

| **`config` Property** | **Type** | **Description** |
| --------------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -57,6 +57,8 @@ As a measure to protect against saving faulty recordings, once the recording tim

A number of messages are sent between the service worker and a client using the `postMessage` interface to communicate and initiate different actions.

**NB** These are internal and added only for developer reference.

| **Message type (event.data.type)** | **Sent by? (SW or Client)** | **Payload expected (event.data.payload)** | **Event** | **Notes** |
| ---------------------------------- | --------------------------- | ------------------------------------------ | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SKIP_WAITING | Client | | Client confirms using newly installed service worker | Activates newly installed and waiting service worker. A ‘controller change’ event will be triggered, upon which the client should reload the window to use the most recent static assets. |
Expand Down

0 comments on commit d38be02

Please sign in to comment.