Interface nsIServiceWorkerManagerType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aClientInfo: const_ClientInfoRef
    • aServiceWorker: const_ServiceWorkerDescriptorRef

    Returns bool

  • Parameters

    • aListener: nsIServiceWorkerManagerListener

    Returns void

  • Returns nsIArray

  • Parameters

    • aPrincipal: nsIPrincipal
    • aScope: string

    Returns nsIServiceWorkerRegistrationInfo

  • Get an extension background service worker registration for a given extension principal, return an nsIServiceWorkerRegistrationInfo if one exists (or null if no registration has been found).

    Parameters

    • aPrincipal: nsIPrincipal
    • regInfo: nsIServiceWorkerRegistrationInfo

    Returns void

  • Parameters

    • aPrincipal: nsIPrincipal
    • aPath: string

    Returns string

  • Parameters

    • aPrincipal: nsIPrincipal
    • aCallback: nsIServiceWorkerUnregisterCallback
    • aScope: string

    Returns void

  • Register an extension background service worker for a given extension principal and return a promise that resolves to the nsIServiceWorkerRegistrationInfo (or rejects if there was one already registered).

    Parameters

    • aPrincipal: nsIPrincipal

    Returns any

  • A testing helper that registers a service worker for testing purpose (e.g. used to test a remote worker that has to spawn a new process to be launched). This method can only be used when "dom.serviceWorkers.testing.enabled" is true and it doesn't support all the registration options (e.g. updateViaCache is set automatically to "imports").

    Parameters

    • aPrincipal: nsIPrincipal
    • aScope: string
    • aScriptURL: string

    Returns any

  • A testing helper that is meant to only be used in xpcshell-test to test behaviors that would need a browser restart to re-initialize the ServiceWorkerManager from the service worker registration dumped on disk (the one listed in the serviceworker.txt file part of the Firefox profile directory).

    NOTE: this test helper does

    • fail if "dom.serviceWorkers.testing.enabled" is not set to true
    • fail if there are controlled clients (the test case is responsible of making sure that there is none when this method is being called)
    • shutdown and clear all service worker registrations (but without removing them from the registration stored in serviceworker.txt)
    • force reload the registration data stored in serviceworker.txt (but the test case using this helper is responsible to be sure that the registrations have been already written on disk)

    Returns void

  • Parameters

    • aListener: nsIServiceWorkerManagerListener

    Returns void

  • Parameters

    • aOriginAttributes: string

    Returns void

  • Parameters

    • aOriginSuffix: string
    • scope: string
    • aID: string
    • aTitle: string
    • aDir: string
    • aLang: string
    • aBody: string
    • aTag: string
    • aIcon: string
    • aData: string
    • aBehavior: string

    Returns void

  • Parameters

    • aOriginSuffix: string
    • scope: string
    • aID: string
    • aTitle: string
    • aDir: string
    • aLang: string
    • aBody: string
    • aTag: string
    • aIcon: string
    • aData: string
    • aBehavior: string

    Returns void

  • Parameters

    • aOriginAttributes: string
    • aScope: string
    • aDataBytes: invalid

    Returns void

  • Parameters

    • aOriginAttributes: string
    • scope: string

    Returns void

  • Unregister an existing ServiceWorker registration for aScope. It keeps aCallback alive until the operation is concluded.

    Parameters

    • aPrincipal: nsIPrincipal
    • aCallback: nsIServiceWorkerUnregisterCallback
    • aScope: string

    Returns void

  • Wake up the extension background service worker given its extension base url, for an API event identified by the namespace and event name strings.

    Returns a Promise which is resolved to true if a listener has been subscribed during the synchronous worker script execution for the expected WebExtensions API event.

    NOTE: ExtensionBrowser and ExtensionEventManager interfaces are keeping track of these listeners. These are WebExtensions API event listeners and they do not involve any functional events at all.

    Parameters

    • aExtensionBaseURL: string
    • aAPINamespace: string
    • aAPIEventName: string

    Returns any

Generated using TypeDoc