Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
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).
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).
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").
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
Unregister an existing ServiceWorker registration for aScope
.
It keeps aCallback alive until the operation is concluded.
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.
Generated using TypeDoc
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.