Search completed in 0.94 seconds.
ServiceWorkerContainer - Web APIs
the
serviceworkercontainer interface of the service worker api provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
... the
serviceworkercontainer interface of the service worker api provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
...kercontainer interface of the service worker api provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
...And 30 more matches
ServiceWorkerGlobalScope - Web APIs
the
serviceworkerglobalscope interface of the
serviceworker api represents the global execution context of a service worker.
... the
serviceworkerglobalscope interface of the
serviceworker api represents the global execution context of a service worker.
...hould keep in mind that the
serviceworker state is not persisted across the termination/restart cycle, so each event handler should assume it's being invoked with a bare, default global state.
...And 24 more matches
ServiceWorker - Web APIs
the
serviceworker interface of the
serviceworker api provides a reference to a service worker.
... the
serviceworker interface of the
serviceworker api provides a reference to a service worker.
... the
serviceworker interface of the
serviceworker api provides a reference to a service worker.
...And 21 more matches
ServiceWorkerRegistration - Web APIs
the
serviceworkerregistration interface of the service worker api represents the service worker registration.
... the
serviceworkerregistration interface of the service worker api represents the service worker registration.
...ce of the service worker api represents the service worker registration.
...And 21 more matches
ServiceWorkerMessageEvent - Web APIs
important: in modern browsers, this interface has been deprecated.
... important: in modern browsers, this interface has been deprecated.
... important: in modern browsers, this interface has been deprecated.
...And 11 more matches
ServiceWorker.onstatechange - Web APIs
an eventlistener property called whenever an event of type statechange is fired; it is basically fired anytime the
serviceworker.state changes.
... an eventlistener property called whenever an event of type statechange is fired; it is basically fired anytime the
serviceworker.state changes.
... an eventlistener property called whenever an event of type statechange is fired; it is basically fired anytime the
serviceworker.state changes.
...And 8 more matches
ServiceWorkerContainer.register() - Web APIs
the register() method of the
serviceworkercontainer interface creates or updates a
serviceworkerregistration for the given scripturl.
...navigation matching.
...e controlled page.
...And 8 more matches
ServiceWorker.state - Web APIs
the state read-only property of the
serviceworker interface returns a string representing the current state of the service worker.
... the state read-only property of the
serviceworker interface returns a string representing the current state of the service worker.
... the state read-only property of the
serviceworker interface returns a string representing the current state of the service worker.
...And 6 more matches
ServiceWorkerContainer.ready - Web APIs
the ready read-only property of the
serviceworkercontainer interface provides a way of delaying code execution until a service worker is active.
... the ready read-only property of the
serviceworkercontainer interface provides a way of delaying code execution until a service worker is active.
... the ready read-only property of the
serviceworkercontainer interface provides a way of delaying code execution until a service worker is active.
...And 6 more matches
ServiceWorkerContainer.startMessages() - Web APIs
the startmessages() method of the
serviceworkercontainer interface explicitly starts the flow of messages being dispatched from a service worker to pages under its control (e.g.
...e that page's content has finished loading.
...tloaded event fires).
...And 6 more matches
ServiceWorkerContainer.getRegistration() - Web APIs
the getregistration() method of the
serviceworkercontainer interface gets a
serviceworkerregistration object whose scope url matches the provided document url.
... the getregistration() method of the
serviceworkercontainer interface gets a
serviceworkerregistration object whose scope url matches the provided document url.
... the getregistration() method of the
serviceworkercontainer interface gets a
serviceworkerregistration object whose scope url matches the provided document url.
...And 5 more matches
ServiceWorkerGlobalScope: message event - Web APIs
the message event of the
serviceworkerglobalscope interface occurs when incoming messages are received.
... the message event of the
serviceworkerglobalscope interface occurs when incoming messages are received.
...viceworker.postmessage() method to send messages to service workers.
...And 5 more matches
ServiceWorkerContainer.controller - Web APIs
the controller read-only property of the
serviceworkercontainer interface returns a
serviceworker object if its state is activated (the same object returned by
serviceworkerregistration.active).
... the controller read-only property of the
serviceworkercontainer interface returns a
serviceworker object if its state is activated (the same object returned by
serviceworkerregistration.active).
... the controller read-only property of the
serviceworkercontainer interface returns a
serviceworker object if its state is activated (the same object returned by
serviceworkerregistration.active).
...And 4 more matches
ServiceWorkerContainer.getRegistrations() - Web APIs
the getregistrations() method of the
serviceworkercontainer interface gets all
serviceworkerregistrations associated with a
serviceworkercontainer, in an array.
... the getregistrations() method of the
serviceworkercontainer interface gets all
serviceworkerregistrations associated with a
serviceworkercontainer, in an array.
... the getregistrations() method of the
serviceworkercontainer interface gets all
serviceworkerregistrations associated with a
serviceworkercontainer, in an array.
...And 4 more matches
ServiceWorkerRegistration.active - Web APIs
the active property of the
serviceworkerregistration interface returns a service worker whose
serviceworker.state is activated.
... the active property of the
serviceworkerregistration interface returns a service worker whose
serviceworker.state is activated.
... the active property of the
serviceworkerregistration interface returns a service worker whose
serviceworker.state is activated.
...And 4 more matches
ServiceWorkerMessageEvent.source - Web APIs
important: in modern browsers, this property has been deprecated.
... important: in modern browsers, this property has been deprecated.
... important: in modern browsers, this property has been deprecated.
...And 3 more matches
ServiceWorkerRegistration.pushManager - Web APIs
the pushmanager property of the
serviceworkerregistration interface returns a reference to the pushmanager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status.
... the pushmanager property of the
serviceworkerregistration interface returns a reference to the pushmanager interface for managing push subscriptions; this includes support for subscribing, getting an active subscription, and accessing push permission status.
...s includes support for subscribing, getting an active subscription, and accessing push permission status.
...And 3 more matches
ServiceWorkerRegistration.showNotification() - Web APIs
the shownotification() method of the
serviceworkerregistration interface creates a notification on an active service worker.
... the shownotification() method of the
serviceworkerregistration interface creates a notification on an active service worker.
... of the notification.
...And 3 more matches
ServiceWorkerRegistration.unregister() - Web APIs
the unregister() method of the
serviceworkerregistration interface unregisters the service worker registration and returns a promise.
... the unregister() method of the
serviceworkerregistration interface unregisters the service worker registration and returns a promise.
...e.
...And 3 more matches
ServiceWorkerRegistration.update() - Web APIs
the update() method of the
serviceworkerregistration interface attempts to update the service worker.
... update() method of the
serviceworkerregistration interface attempts to update the service worker.
... fetches the worker's script url, and if the new worker is not byte-by-byte identical to the current worker, it installs the new worker.
...And 3 more matches
Navigator.serviceWorker - Web APIs
the navigator.
serviceworker read-only property returns the
serviceworkercontainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the
serviceworker.
... the navigator.
serviceworker read-only property returns the
serviceworkercontainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the
serviceworker.
... the navigator.
serviceworker read-only property returns the
serviceworkercontainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the
serviceworker.
...And 2 more matches
ServiceWorkerContainer.onmessage - Web APIs
the onmessage property of the
serviceworkercontainer interface is an event handler fired whenever a message event occurs — when incoming messages are received to the
serviceworkercontainer object (e.g., via a client.postmessage() call).
...ndler fired whenever a message event occurs — when incoming messages are received to the
serviceworkercontainer object (e.g., via a client.postmessage() call).
...eived to the
serviceworkercontainer object (e.g., via a client.postmessage() call).
...And 2 more matches
ServiceWorkerRegistration.installing - Web APIs
the installing property of the
serviceworkerregistration interface returns a service worker whose
serviceworker.state is installing.
... the installing property of the
serviceworkerregistration interface returns a service worker whose
serviceworker.state is installing.
... the installing property of the
serviceworkerregistration interface returns a service worker whose
serviceworker.state is installing.
...And 2 more matches
ServiceWorkerRegistration.waiting - Web APIs
the waiting property of the
serviceworkerregistration interface returns a service worker whose
serviceworker.state is installed.
... the waiting property of the
serviceworkerregistration interface returns a service worker whose
serviceworker.state is installed.
... the waiting property of the
serviceworkerregistration interface returns a service worker whose
serviceworker.state is installed.
...And 2 more matches
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
the
serviceworkerglobalscope.onnotificationclick property is an event handler called whenever the notificationclick event is dispatched on the
serviceworkerglobalscope object, that is when a user clicks on a displayed notification spawned by
serviceworkerregistration.shownotification().
...ched on the
serviceworkerglobalscope object, that is when a user clicks on a displayed notification spawned by
serviceworkerregistration.shownotification().
...cation spawned by
serviceworkerregistration.shownotification().
...ocus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }; specifications specification status comment notifications apithe definition of 'onnotificationclick' in that specification.
ServiceWorkerGlobalScope.registration - Web APIs
the registration read-only property of the
serviceworkerglobalscope interface returns a reference to the
serviceworkerregistration object, which represents the service worker's registration.
... the registration read-only property of the
serviceworkerglobalscope interface returns a reference to the
serviceworkerregistration object, which represents the service worker's registration.
... the registration read-only property of the
serviceworkerglobalscope interface returns a reference to the
serviceworkerregistration object, which represents the service worker's registration.
... the registration read-only property of the
serviceworkerglobalscope interface returns a reference to the
serviceworkerregistration object, which represents the service worker's registration.
ServiceWorkerMessageEvent.data - Web APIs
important: in modern browsers, this property has been deprecated.
... important: in modern browsers, this property has been deprecated.
...ad-only property of the
serviceworkermessageevent interface returns the event's data.
...essageevent interface returns the event's data.
ServiceWorkerMessageEvent.lastEventId - Web APIs
important: in modern browsers, this property has been deprecated.
... important: in modern browsers, this property has been deprecated.
...ermessageevent interface represents, in server-sent events, the last event id of the event source.
...n server-sent events, the last event id of the event source.
ServiceWorkerMessageEvent.origin - Web APIs
important: in modern browsers, this property has been deprecated.
... important: in modern browsers, this property has been deprecated.
...
serviceworkermessageevent interface returns the origin of the service worker's environment settings object.
...eturns the origin of the service worker's environment settings object.
ServiceWorkerMessageEvent.ports - Web APIs
important: in modern browsers, this property has been deprecated.
... important: in modern browsers, this property has been deprecated.
... messageport objects connected with the message channel the message is being sent through.
...e message channel the message is being sent through.
ServiceWorkerRegistration.getNotifications() - Web APIs
the getnotifications() method of the
serviceworkerregistration interface returns a list of the notifications in the order that they were created from the current origin via the current service worker registration.
...ions) .then(function(notificationslist) { ...
...n object containing options to filter the notifications returned.
...ation objects.
ServiceWorkerRegistration.scope - Web APIs
the scope read-only property of the
serviceworkerregistration interface returns a unique identifier for a service worker registration.
... the scope read-only property of the
serviceworkerregistration interface returns a unique identifier for a service worker registration.
... the scope read-only property of the
serviceworkerregistration interface returns a unique identifier for a service worker registration.
...eworkerregistration interface returns a unique identifier for a service worker registration.
serviceworker - Web app manifests
type object mandatory no the
serviceworker member describes a service worker that the developer intends to install to control the pwa.
... type object mandatory no the
serviceworker member describes a service worker that the developer intends to install to control the pwa.
... type object mandatory no the
serviceworker member describes a service worker that the developer intends to install to control the pwa.
...the developer intends to install to control the pwa.
ServiceWorker.scriptURL - Web APIs
returns the
serviceworker serialized script url defined as part of
serviceworkerregistration.
... returns the
serviceworker serialized script url defined as part of
serviceworkerregistration.
... returns the
serviceworker serialized script url defined as part of
serviceworkerregistration.
ServiceWorkerContainer.oncontrollerchange - Web APIs
the oncontrollerchange property of the
serviceworkercontainer interface is an event handler fired whenever a controllerchange event occurs — when the document's associated
serviceworkerregistration acquires a new active worker.
... the oncontrollerchange property of the
serviceworkercontainer interface is an event handler fired whenever a controllerchange event occurs — when the document's associated
serviceworkerregistration acquires a new active worker.
...ceworkercontainer interface is an event handler fired whenever a controllerchange event occurs — when the document's associated
serviceworkerregistration acquires a new active worker.
ServiceWorkerContainer.onerror - Web APIs
the onerror property of the
serviceworkercontainer interface is an event handler fired whenever an error event occurs in the associated service workers.
... the onerror property of the
serviceworkercontainer interface is an event handler fired whenever an error event occurs in the associated service workers.
... the onerror property of the
serviceworkercontainer interface is an event handler fired whenever an error event occurs in the associated service workers.
ServiceWorkerGlobalScope: activate event - Web APIs
the activate event of the
serviceworkerglobalscope interface is fired when a
serviceworkerregistration acquires a new
serviceworkerregistration.active worker.
... the activate event of the
serviceworkerglobalscope interface is fired when a
serviceworkerregistration acquires a new
serviceworkerregistration.active worker.
...pet shows how you could use an activate event handler to upgrade a cache.
ServiceWorkerGlobalScope: install event - Web APIs
the install event of the
serviceworkerglobalscope interface is fired when a
serviceworkerregistration acquires a new
serviceworkerregistration.installing worker.
... the install event of the
serviceworkerglobalscope interface is fired when a
serviceworkerregistration acquires a new
serviceworkerregistration.installing worker.
... '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ); }) ); }); you can also set up the event handler using the
serviceworkerglobalscope.oninstall property: globalscope.oninstall = function(event) { ...
ServiceWorkerGlobalScope.onmessage - Web APIs
the onmessage property of the
serviceworkerglobalscope interface is an event handler fired whenever a message event occurs — when incoming messages are received.
...xtending the lifetime of the event.
... the extendablemessageevent interface which extends the extendableevent interface.
ServiceWorkerGlobalScope.onpush - Web APIs
the
serviceworkerglobalscope.onpush event of the
serviceworkerglobalscope interface is fired whenever a push message is received by a service worker via a push server.
... the
serviceworkerglobalscope.onpush event of the
serviceworkerglobalscope interface is fired whenever a push message is received by a service worker via a push server.
....addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'onpush' in that specification.
ServiceWorkerGlobalScope.onpushsubscriptionchange - Web APIs
the
serviceworkerglobalscope.onpushsubscriptionchange event of the
serviceworkerglobalscope interface is fired to indicate a change in push subscription that was triggered outside the application's control, e.g.
...ntrol, e.g.
...nction() { // do something, usually resubscribe to push and // send the new subscription details back to the // server via xhr or fetch }); specifications specification status comment push apithe definition of 'onpushsubscriptionchange' in that specification.
ServiceWorkerRegistration.index - Web APIs
the index read-only property of the
serviceworkerregistration interface returns a reference to the contentindex interface, which allows for indexing of offline content.
... the index read-only property of the
serviceworkerregistration interface returns a reference to the contentindex interface, which allows for indexing of offline content.
...ns a reference to the contentindex interface, which allows for indexing of offline content.
ServiceWorkerRegistration.onupdatefound - Web APIs
the onupdatefound property of the
serviceworkerregistration interface is an eventlistener property called whenever an event of type statechange is fired; it is fired any time the
serviceworkerregistration.installing property acquires a new service worker.
... the onupdatefound property of the
serviceworkerregistration interface is an eventlistener property called whenever an event of type statechange is fired; it is fired any time the
serviceworkerregistration.installing property acquires a new service worker.
...istener property called whenever an event of type statechange is fired; it is fired any time the
serviceworkerregistration.installing property acquires a new service worker.
ServiceWorkerGlobalScope.caches - Web APIs
the caches read-only property of the
serviceworkerglobalscope interface returns the cachestorage object associated with the service worker.
... the caches read-only property of the
serviceworkerglobalscope interface returns the cachestorage object associated with the service worker.
ServiceWorkerGlobalScope.clients - Web APIs
the clients read-only property of the
serviceworkerglobalscope interface returns the clients object associated with the service worker.
... the clients read-only property of the
serviceworkerglobalscope interface returns the clients object associated with the service worker.
ServiceWorkerGlobalScope: contentdelete event - Web APIs
the contentdelete event of the
serviceworkerglobalscope interface is fired when an item is removed from the indexed content via the user agent.
...ses a contentdelete event handler to remove cached content related to the deleted index item.
ServiceWorkerGlobalScope.onactivate - Web APIs
the onactivate property of the
serviceworkerglobalscope interface is an event handler fired whenever an activate event occurs (when the service worker activates).
... the onactivate property of the
serviceworkerglobalscope interface is an event handler fired whenever an activate event occurs (when the service worker activates).
ServiceWorkerGlobalScope.oncontentdelete - Web APIs
the oncontentdelete property of the
serviceworkerglobalscope interface is an event handler fired when an item is removed from the indexed content via the user agent.
... the oncontentdelete property of the
serviceworkerglobalscope interface is an event handler fired when an item is removed from the indexed content via the user agent.
ServiceWorkerGlobalScope.onfetch - Web APIs
the onfetch property of the
serviceworkerglobalscope interface is an event handler fired whenever a fetch event occurs (usually when the windoworworkerglobalscope.fetch() method is called.) syntax
serviceworkerglobalscope.onfetch = function(fetchevent) { ...
... the onfetch property of the
serviceworkerglobalscope interface is an event handler fired whenever a fetch event occurs (usually when the windoworworkerglobalscope.fetch() method is called.) syntax
serviceworkerglobalscope.onfetch = function(fetchevent) { ...
ServiceWorkerGlobalScope.oninstall - Web APIs
the oninstall property of the
serviceworkerglobalscope interface is an event handler fired whenever an install event occurs (when the service worker installs).
... the oninstall property of the
serviceworkerglobalscope interface is an event handler fired whenever an install event occurs (when the service worker installs).
ServiceWorkerGlobalScope.onsync - Web APIs
the
serviceworkerglobalscope.onsync event of the
serviceworkerglobalscope interface is fired whenever a syncevent event occurs.
... the
serviceworkerglobalscope.onsync event of the
serviceworkerglobalscope interface is fired whenever a syncevent event occurs.
ServiceWorkerGlobalScope.skipWaiting() - Web APIs
the
serviceworkerglobalscope.skipwaiting() method of the
serviceworkerglobalscope forces the waiting service worker to become the active service worker.
... the
serviceworkerglobalscope.skipwaiting() method of the
serviceworkerglobalscope forces the waiting service worker to become the active service worker.
ServiceWorkerRegistration.navigationPreload - Web APIs
the navigationpreload read-only property of the
serviceworkerregistration interface returns the navigationpreloadmanager associated with the current service worker registration.
... the navigationpreload read-only property of the
serviceworkerregistration interface returns the navigationpreloadmanager associated with the current service worker registration.
ServiceWorkerRegistration.periodicSync - Web APIs
note: this feature was mentioned as an idea in the sw explainer at some point, but as yet has not been implemented anywhere.
... note: this feature was mentioned as an idea in the sw explainer at some point, but as yet has not been implemented anywhere.
ServiceWorkerRegistration.sync - Web APIs
the sync property of the
serviceworkerregistration interface returns a reference to the syncmanager interface, which manages background synchronization processes.
... the sync property of the
serviceworkerregistration interface returns a reference to the syncmanager interface, which manages background synchronization processes.
ServiceWorkerContainer: message event - Web APIs
// in the service worker async function messageclient(clientid) { const client = await clients.get(clientid); client.postmessage('hi client!'); } addeventlistener('fetch', (event) => { messageclient(event.clientid); event.respondwith(() => { // ...
Index - Web APIs
offset into the start node of the range's start position.
... the variable property of the cssvariablereferencevalue interface a built-in css value to be returned by the custom name.
...esponse object pairs that are cached, for example as part of the
serviceworker life cycle.
...And 298 more matches
Service Worker API - Web APIs
ying to do, and then break when those assumptions are not exactly right; you have granular control over everything.
...ce worker available, the new version is installed in the background, but not yet activated — at this point it is called the worker in waiting.
...hronization: start up a service worker even when no users are at the site, so caches can be updated, etc.
...And 25 more matches
Content Index API - Web APIs
d to provide a url for a page that displays media, and which works offline.
...ex interface provides functionality to register content available offline.
...rface of the content index api defines the object used to represent the contentdelete event.
...And 5 more matches
Using Service Workers - Web APIs
e with native apps, which is one of the main reasons native apps are often chosen over web apps.
...mo code is not working in your installed versions, you might need to enable a pref: firefox nightly: go to about:config and set dom.
serviceworkers.enabled to true; restart browser.
...are restricted to running across https for security reasons.
...And 5 more matches
ExtendableMessageEvent - Web APIs
the extendablemessageevent interface of the service worker api represents the event object of a message event fired on a service worker (when a message is received on the
serviceworkerglobalscope from another context) — extends the lifetime of such events.
... an empty string.
...ablemessageevent.source read only returns a reference to the client object that sent the message.
...And 4 more matches
Push API - Web APIs
ice worker.
...des all the information that the application needs to send a push message: an endpoint and the encryption key needed for sending data.
...ate a visible notification.
...And 4 more matches
Notifications API - Web APIs
ed for notifications, push will also be enabled.
...isplay, notification sound to play, and more.
...more.
...And 3 more matches
ContentIndex - Web APIs
properties there are no properties of this interface.
...the currently indexed content.
... url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.
serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } retrieving items within the current index the below example shows an asynchronous function that retrieves items within the content index and iterates over each en...
...And 2 more matches
Using Fetch - Web APIs
ookie')); // false myheaders.set('content-type', 'text/html'); myheaders.append('x-custom-header', 'anothervalue'); console.log(myheaders.get('content-length')); // 11 console.log(myheaders.get('x-custom-header')); // ['processthisimmediately', 'anothervalue'] myheaders.delete('x-custom-header'); console.log(myheaders.get('x-custom-header')); // [ ] some of these operations are only useful in
serviceworkers, but they provide a much nicer api for manipulating headers.
...ects which mutation operations are allowed on the headers object.
...guard for a headers object obtained from a request created with request.mode no-cors.
...And 2 more matches
InstallEvent - Web APIs
the parameter passed into the oninstall handler, the installevent interface represents an install action that is dispatched on the
serviceworkerglobalscope of a
serviceworker.
...amily="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">installevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor installevent.installevent() creates a new installevent object.
...ew installevent object.
...And 2 more matches
PushManager - Web APIs
the pushmanager interface of the push api provides a way to receive notifications from third-party servers as well as request urls for push notifications.
...iption().
...nregister() unregisters and deletes a specified subscription endpoint.
...And 2 more matches
onnotificationclose - Web APIs
the
serviceworkerglobalscope.onnotificationclose property is an event handler called whenever the notificationclose event is dispatched on the
serviceworkerglobalscope object, that is when a user closes a displayed notification spawned by
serviceworkerregistration.shownotification().
...patched on the
serviceworkerglobalscope object, that is when a user closes a displayed notification spawned by
serviceworkerregistration.shownotification().
...cation spawned by
serviceworkerregistration.shownotification().
...And 2 more matches
Client-side storage - Learn web development
saves the html, css, and javascript in the cache api via a service worker, allowing the example to run offline!
...d also see the source code.
... service workers are supported.
...e use the
serviceworkercontainer.register() method to register a service worker contained in the sw.js file against the origin it resides at, so it can control pages in the same directory as it, or subdirectories.
Getting started with React - Learn web development
moz-todo-react ├── readme.md ├── node_modules ├── package.json ├── package-lock.json ├── .gitignore ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json └── src ├── app.css ├── app.js ├── app.test.js ├── index.css ├── index.js ├── logo.svg └──
serviceworker.js the src directory is where we'll spend most of our time, as it's where the source code for our application lives.
...p.js file, the statement export default app makes our app component available to other modules.
...nt export default app makes our app component available to other modules.
...'; import reactdom from 'react-dom'; import './index.css'; import app from './app'; import * as
serviceworker from './
serviceworker'; reactdom.render(<app />, document.getelementbyid('root')); // if you want your app to work offline and load faster, you can change // unregister() to register() below.
ExtendableEvent - Web APIs
width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="191" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">extendableevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note: this interface is only available when the global scope is a
serviceworkerglobalscope.
... inherits methods from its parent, event.
...nt.waituntil() extends the lifetime of the event.
...code snippet also shows a best practice for versioning caches used by the service worker.
nsIPushService
domstring scope, in nsiprincipal principal, in nsipushsubscriptioncallback callback); void unsubscribe(in domstring scope, in nsiprincipal principal, in nsiunsubscriberesultcallback callback); methods subscribe() creates a push subscription.
...iobserver should ensure the data parameter matches your subscription scope.
...ject data description push api counterpart push-message nsipushmessage if the message has a payload; null for blank messages.
Cache - Web APIs
the cache interface provides a storage mechanism for request / response object pairs that are cached, for example as part of the
serviceworker life cycle.
...ponse object pairs that are cached, for example as part of the
serviceworker life cycle.
... code.
Client.type - Web APIs
the client interface indicates the type of client the service worker is controlling.
...t the service worker is controlling.
...type = client.type; value a string, representing the client type.
Navigator - Web APIs
navigatorid.platform read only returns a string representing the platform of the browser.
...turns a string representing the platform of the browser.
....
WorkerGlobalScope - Web APIs
r.
...ontext; this scope contains the information usually conveyed by window objects — in this case event handlers, the console or the associated workernavigator object.
...orkerglobalscope.navigator read only returns the workernavigator associated with the worker.
CSP: worker-src - HTTP
the http content-security-policy (csp) worker-src directive specifies valid sources for worker, sharedworker, or
serviceworker scripts.
...> or <style> tags and note that capitalization and whitespace matter, including leading or trailing whitespace.
...ts.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
t the api by providing offline support, but won't break anything for those using legacy browsers.
...on't break anything for those using legacy browsers.
...e worker we'll start by looking at the code that registers a new service worker, in the app.js file: note : we're using the es6 arrow functions syntax in the service worker implementation if('
serviceworker' in navigator) { navigator.
serviceworker.register('./pwa-examples/js13kpwa/sw.js'); }; if the service worker api is supported in the browser, it is registered against the site using the
serviceworkercontainer.register() method.
about:debugging (before Firefox 68) - Firefox Developer Tools
service worker's initial registration, and its assuming control of pages.
...displayed in the service workers section of the workers page if service workers are incompatible with the current browser configuration, and therefore cannot be used or debugged.
Client.postMessage() - Web APIs
the postmessage() method of the client interface allows a service worker to send a message to a client (a window, worker, or sharedworker).
... (!event.clientid) return; // get the client.
ContentIndexEvent.id - Web APIs
the read-only id property of the contentindexevent interface is a string which identifies the deleted content index via it's id.
...indexevent interface is a string which identifies the deleted content index via it's id.
InstallEvent.activeWorker - Web APIs
the activeworker read-only property of the installevent interface returns the
serviceworker that is currently actively controlling the page.
... the activeworker read-only property of the installevent interface returns the
serviceworker that is currently actively controlling the page.
MessageEvent.source - Web APIs
the source read-only property of the messageevent interface is a messageeventsource (which can be a windowproxy, messageport, or
serviceworker object) representing the message emitter.
... the source read-only property of the messageevent interface is a messageeventsource (which can be a windowproxy, messageport, or
serviceworker object) representing the message emitter.
MessageEvent - Web APIs
nt messages in: server-sent events (see eventsource.onmessage).
...so inherits properties from its parent, event.
NotificationEvent - Web APIs
the parameter passed into the onnotificationclick handler, the notificationevent interface represents a notification click event that is dispatched on the
serviceworkerglobalscope of a
serviceworker.
...ent) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment notifications apithe definition of 'notificationevent' in that specification.
ReadableStream.tee() - Web APIs
the tee() method of the readablestream interface tees the current readable stream, returning a two-element array containing the two resulting branches as new readablestream instances.
...nterface tees the current readable stream, returning a two-element array containing the two resulting branches as new readablestream instances.
Request.mode - Web APIs
the associated mode, available values of which are: same-origin — if a request is made to another origin with this mode set, the result is simply an error.
...g made to your origin.
Streams API concepts - Web APIs
eam at once, it is possible to split a stream into two identical copies, which can then be read by two separate readers.
...s.
Event reference
ough a websocket.
...mouseevent dom l3 a pointing device button is released over an element.
Firefox and the "about" protocol
and firefox lockwise data about:restartrequired a page users are sent to when firefox requires a restart due to an update about:reader indicates a web page has firefox reader view turned on.
AbstractWorker - Web APIs
the abstractworker interface of the web workers api is an abstract interface that defines properties and methods that are common to all types of worker, including not only the basic worker, but also
serviceworker and sharedworker.
Clients.claim() - Web APIs
the claim() method of the clients interface allows an active service worker to set itself as the controller for all clients within its scope.
ContentIndex.add() - Web APIs
url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.
serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } the add method can also be used within the service worker scope.
ContentIndexEvent - Web APIs
the contentindexevent interface of the content index api defines the object used to represent the contentdelete event.
FetchEvent.preloadResponse - Web APIs
the preloadresponse read-only property of the fetchevent interface returns a promise that resolves to the navigation preload response if navigation preload was triggered or undefined otherwise.
PushEvent - Web APIs
the pushevent interface of the push api represents a push message that has been received.
PushSubscription.endpoint - Web APIs
oint takes the form of a custom url pointing to a push server, which can be used to send a push message to the particular service worker instance that subscribed to the push service.
PushSubscription.toJSON() - Web APIs
the tojson() method of the pushsubscription interface is a standard serializer: it returns a json representation of the subscription properties, providing a useful shortcut.
PushSubscription.unsubscribe() - Web APIs
the unsubscribe() method of the pushsubscription interface returns a promise that resolves to a boolean when the current subscription is successfully unsubscribed.
Request() - Web APIs
content-type': 'image/jpeg' }, mode: 'cors', cache: 'default' }; var myrequest = new request('flowers.jpg', myinit); you may also pass a request object to the request() constructor to create a copy of the request (this is similar to calling the clone() method.) var copy = new request(myrequest); note: this last usage is probably only useful in
serviceworkers.
Request.context - Web APIs
the deprecated context read-only property of the request interface contains the context of the request (e.g., audio, image, iframe).
Response.error() - Web APIs
the error() method of the response interface returns a new response object associated with a network error.
Response.useFinalURL - Web APIs
the usefinalurl property of the response interface contains a boolean stating whether this is the final url of the response.
SyncEvent - Web APIs
the syncevent interface represents a sync action that is dispatched on the
serviceworkerglobalscope of a
serviceworker.
SyncManager - Web APIs
the syncmanager interface of the the
serviceworker api provides an interface for registering and listing sync registrations.
WindowClient - Web APIs
the windowclient interface of the
serviceworker api represents the scope of a service worker client that is a document in a browsing context, controlled by an active worker.
Web APIs
element svgtspanelement svgtests svgtextcontentelement svgtextelement svgtextpathelement svgtextpositioningelement svgtitleelement svgtransform svgtransformlist svgtransformable svgurireference svgunittypes svguseelement svgvkernelement svgviewelement svgzoomandpan screen screenorientation scriptprocessornode scrolltooptions securitypolicyviolationevent selection sensor sensorerrorevent
serviceworker serviceworkercontainer
serviceworkerglobalscope
serviceworkermessageevent
serviceworkerregistration
serviceworkerstate shadowroot sharedworker sharedworkerglobalscope slottable sourcebuffer sourcebufferlist speechgrammar speechgrammarlist speechrecognition speechrecognitionalternative speechrecognitionerror speechrecognitionerrorevent speechrecognitionevent speechrecognitionre...
Index - HTTP
rved over http) as though they have been replaced with secure urls (those served over https).
Sec-Fetch-Dest - HTTP
x sec- cors-safelisted request header syntax sec-fetch-dest: audio sec-fetch-dest: audioworklet sec-fetch-dest: document sec-fetch-dest: embed sec-fetch-dest: empty sec-fetch-dest: font sec-fetch-dest: image sec-fetch-dest: manifest sec-fetch-dest: nested-document sec-fetch-dest: object sec-fetch-dest: paintworklet sec-fetch-dest: report sec-fetch-dest: script sec-fetch-dest:
serviceworker sec-fetch-dest: sharedworker sec-fetch-dest: style sec-fetch-dest: track sec-fetch-dest: video sec-fetch-dest: worker sec-fetch-dest: xslt sec-fetch-dest: audioworklet sec-fetch-dest: audioworklet values audio audioworklet document embed empty font image manifest object paintworklet report script
serviceworker sharedworker style track video ...
HTTP Index - HTTP
they have been replaced with secure urls (those served over https).
Progressive web app structure - Progressive web apps (PWAs)
.replace(/name/g,games[i].name) .replace(/author/g,games[i].author) .replace(/twitter/g,games[i].twitter) .replace(/website/g,games[i].website) .replace(/github/g,games[i].github); entry = entry.replace('<a href=\'http:///\'></a>','-'); content += entry; }; document.getelementbyid('content').innerhtml = content; next, it registers a service worker: if('
serviceworker' in navigator) { navigator.
serviceworker.register('/pwa-examples/js13kpwa/sw.js'); }; the next code block requests permission for notifications when a button is clicked: var button = document.getelementbyid("notifications"); button.addeventlistener('click', function(e) { notification.requestpermission().then(function(result) { if(result === 'granted') { randomnotific...
Structural overview of progressive web apps - Progressive web apps (PWAs)
.replace(/name/g,games[i].name) .replace(/author/g,games[i].author) .replace(/twitter/g,games[i].twitter) .replace(/website/g,games[i].website) .replace(/github/g,games[i].github); entry = entry.replace('<a href=\'http:///\'></a>','-'); content += entry; }; document.getelementbyid('content').innerhtml = content; then it registers a service worker: if ("
serviceworker" in navigator) { navigator.
serviceworker.register("/pwa-examples/js13kpwa/sw.js"); } after that, the app adds a handler for clicks on a button whose id is notifications; this handler requests permission to send notifications to the user, then generates and sends a random notification.
Secure contexts - Web security
e security properties of the network channel used to deliver the resource must not be considered deprecated feature detection pages can use feature detection to check whether they are in a secure context or not by using the issecurecontext boolean, which is exposed on the global scope.