ChemPal Documentation - v1.18.0
    Preparing search index...

    Module helpers/backgroundFetch

    Functions - Helpers

    runInBackgroundContext

    Marks this context as the service worker, so backgroundFetch calls fetch directly. A worker's runtime.sendMessage is never delivered to itself. Set explicitly rather than detected, because Firefox runs the same script as an event page, which does have a window.

    backgroundFetch

    Performs an HTTP request from the extension's background service worker instead of the calling context, then reconstructs a real Response from the serialized reply.

    Interfaces - Helpers

    BackgroundFetchInit

    Serializable subset of RequestInit accepted by backgroundFetch. Only structured-cloneable fields are supported; body must already be a string (callers stringify JSON themselves).