Skip to content

Commit

Permalink
new messageSW utility
Browse files Browse the repository at this point in the history
  • Loading branch information
ShafSpecs committed Apr 24, 2024
1 parent 6e628c6 commit 7abdbd5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion posts/main/utils/misc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ The `isActionRequest` function allows you to check if a request is an action req
The `isDocumentRequest` function allows you to check if a request is a document request. Note, this only detects client-side navigation requests.
To detect document requests as well, check out the `useSWEffect` hook

## `messageSW` 🆕

A utility to send a message to a Service Worker. Takes in two arguments: the service worker and the message to send.

## `sendSkipWaitingMessage`

A utility to send a `SKIP_WAITING` message to a Worker. Takes in one argument, the `ServiceWorker` to send the message to.
A short-hand utility to send a `SKIP_WAITING` message to a Worker. Takes in one argument, the `ServiceWorker` to send the message to.

## `timeout`

Expand Down

0 comments on commit 7abdbd5

Please sign in to comment.