FetchEvent
August 11, 2023
- Interface
Inherits from Event;
import { FetchEvent } from "@plaoc/plugin";
Properties
plugin
The property value is the DwebServiceWorkerPlugin object;
request
The property value is the Request object;
clientId
The property value is a string or null;
public_url
The property value is a string, or a Promise that resolves to a string;
Methods
Method to return data to the sender;
Events
- None
Example
import { FetchEvent } from "@plaoc/plugin";
const event = new FetchEvent("fetch", {
request: toRequest(ipcRequest),
clientId: ipcRequest.req_id.toString(),
});
Platform Compatibility
Properties/Methods/Events | Android | iOS | Desktop-Dev | Desktop |
---|---|---|---|---|
plugin | ✅ | ✅ | ✅ | X |
request | ✅ | ✅ | ✅ | X |
clientId | ✅ | ✅ | ✅ | X |
public_url | ✅ | ✅ | ✅ | X |
respondWith | ✅ | ✅ | ✅ | X |
Related Links
Powered by Waline v2.13.0