Skip to content

Commit

Permalink
📖 typo fixes + new message handler option
Browse files Browse the repository at this point in the history
  • Loading branch information
ShafSpecs committed May 6, 2024
1 parent ffe8740 commit b6d6a22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions posts/main/apis/default-fetch-handler.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: defaultFetchHander
title: defaultFetchHandler
description: "Your default handler for fetching requests in your Service Worker."
alternateTitle: defaultFetchHander
alternateTitle: defaultFetchHandler
---

import Info from './info.tsx'
Expand Down
2 changes: 2 additions & 0 deletions posts/main/guides/messaging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ The `NavigationHandler` has the following public signature:
export type NavigationHandlerOptions = {
allowList?: string[] | RegExp[];
denyList?: string[] | RegExp[];
logger?: Logger;
cache: EnhancedCache;
};

Expand All @@ -139,6 +140,7 @@ where the constructor options are as follows:
- `allowList`: A list of regular expressions or strings to match against the current document URL. If the current document URL does not match any of the patterns, the handler will not handle the message. When no routes are provided, all routes would be cached. Defaults to: [].
- `denyList`: A list of regular expressions or strings to match against the current document URL. If the current document URL matches any of the patterns, the handler will not handle the message. If both `allowList` and `denyList` are provided, the `denyList` would take precedence. Defaults to: [].
- `cache`: The `EnhancedCache` to use for handling the navigation event - caching the HTML responses.
- `logger`: A logger to use for logging messages. Defaults to Remix PWA default `logger`.

It also has a `handleMessage` method (like all message handlers) that can be used to handle responses automatically.

Expand Down

0 comments on commit b6d6a22

Please sign in to comment.