Interfaces
SandboxStorageFetchOptions
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
origin? | readonly | string | The origin serving the sandbox’s byte route. Defaults to the service worker’s own origin. |
StorageFetchEvent
The part of a service worker FetchEvent the helper reads and answers.
Properties
Methods
respondWith()
respondWith(response: Promise<Response>): void;
Parameters
| Parameter | Type |
|---|---|
response | Promise<Response> |
Returns
void
Functions
sandboxStorageFetch()
function sandboxStorageFetch(event: StorageFetchEvent, options?: SandboxStorageFetchOptions): boolean;
Answers event from the sandbox when it reads a production Storage object,
and returns whether it did. Any other request is left untouched for the
browser or the app’s own handlers.
The answer keeps the URL’s token and drops production-only parameters such
as generation, as localStorageUrl documents. The request’s method
and headers, such as Range, are carried to the byte route.
Parameters
| Parameter | Type |
|---|---|
event | StorageFetchEvent |
options? | SandboxStorageFetchOptions |
Returns
boolean