Skip to content

Commit

Permalink
fix(macro): update {{AvailableInWorkers}} positions, part 3 (mdn#32574)
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar authored Mar 6, 2024
1 parent e4c0939 commit 4de6f76
Show file tree
Hide file tree
Showing 110 changed files with 110 additions and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ page-type: web-api-instance-property
browser-compat: api.ServiceWorkerRegistration.navigationPreload
---

{{APIRef("Service Workers API")}}{{SecureContext_Header}}
{{APIRef("Service Workers API")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`navigationPreload`** read-only property of the {{domxref("ServiceWorkerRegistration")}} interface returns the {{domxref("NavigationPreloadManager")}} associated with the current service worker registration.

The returned object allows resources managed by a service worker to be preemptively downloaded in parallel with service worker boot up.

{{AvailableInWorkers}}

## Value

An instance of {{domxref("NavigationPreloadManager")}}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ status:
browser-compat: api.ServiceWorkerRegistration.paymentManager
---

{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}}
{{APIRef("Payment Handler API")}}{{SeeCompatTable}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`paymentManager`** read-only property of the
{{domxref("ServiceWorkerRegistration")}} interface returns a payment app's {{domxref("PaymentManager")}} instance, which is used to manage various payment app functionality.

{{AvailableInWorkers}}

## Value

A {{domxref("PaymentManager")}} object instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ status:
browser-compat: api.ServiceWorkerRegistration.periodicSync
---

{{APIRef("Service Workers API")}}{{SeeCompatTable}}{{SecureContext_Header}}
{{APIRef("Service Workers API")}}{{SeeCompatTable}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`periodicSync`** read-only property of
the {{domxref("ServiceWorkerRegistration")}} interface returns a reference to the
{{domxref('PeriodicSyncManager')}} interface, which allows for registering of tasks to
run at specific intervals.

{{AvailableInWorkers}}

## Value

A {{domxref('PeriodicSyncManager')}} object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ page-type: web-api-instance-property
browser-compat: api.ServiceWorkerRegistration.pushManager
---

{{APIRef("Service Workers API")}}{{SecureContext_Header}}
{{APIRef("Service Workers API")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`pushManager`** read-only property of the
{{domxref("ServiceWorkerRegistration")}} interface returns a reference to the
{{domxref("PushManager")}} interface for managing push subscriptions; this includes
support for subscribing, getting an active subscription, and accessing push permission
status.

{{AvailableInWorkers}}

## Value

A {{domxref("PushManager")}} object.
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/serviceworkerregistration/scope/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ page-type: web-api-instance-property
browser-compat: api.ServiceWorkerRegistration.scope
---

{{APIRef("Service Workers API")}}{{SecureContext_Header}}
{{APIRef("Service Workers API")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`scope`** read-only property of the
{{domxref("ServiceWorkerRegistration")}} interface returns a unique identifier for a
service worker registration. The service worker must be on the same origin as the
document that registers the {{domxref("ServiceWorker")}}.

{{AvailableInWorkers}}

## Value

A unique identifier.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ page-type: web-api-instance-method
browser-compat: api.ServiceWorkerRegistration.showNotification
---

{{APIRef("Web Notifications")}}{{SecureContext_Header}}
{{APIRef("Web Notifications")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`showNotification()`** method of the
{{domxref("ServiceWorkerRegistration")}} interface creates a notification on an active
service worker.

{{AvailableInWorkers}}

## Syntax

```js-nolint
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/serviceworkerregistration/sync/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ status:
browser-compat: api.ServiceWorkerRegistration.sync
---

{{APIRef("Background Sync")}}{{SeeCompatTable}}{{SecureContext_Header}}
{{APIRef("Background Sync")}}{{SeeCompatTable}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`sync`** read-only property of the
{{domxref("ServiceWorkerRegistration")}} interface returns a reference to the
{{domxref("SyncManager")}} interface, which manages background synchronization
processes.

{{AvailableInWorkers}}

## Value

A {{domxref("SyncManager")}} object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.ServiceWorkerRegistration.unregister
---

{{APIRef("Service Workers API")}}{{SecureContext_Header}}
{{APIRef("Service Workers API")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`unregister()`** method of the
{{domxref("ServiceWorkerRegistration")}} interface unregisters the service worker
Expand All @@ -17,8 +17,6 @@ unregister if someone else just called {{domxref("ServiceWorkerContainer.registe
with the same scope.) The service worker will finish any ongoing operations before it is
unregistered.

{{AvailableInWorkers}}

## Syntax

```js-nolint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ page-type: web-api-instance-method
browser-compat: api.ServiceWorkerRegistration.update
---

{{APIRef("Service Workers API")}}{{SecureContext_Header}}
{{APIRef("Service Workers API")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`update()`** method of the
{{domxref("ServiceWorkerRegistration")}} interface attempts to update the service
worker. It 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. The fetch of the worker
bypasses any browser caches if the previous fetch occurred over 24 hours ago.

{{AvailableInWorkers}}

## Syntax

```js-nolint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ page-type: web-api-event
browser-compat: api.ServiceWorkerRegistration.updatefound_event
---

{{APIRef("Service Workers API")}}{{SecureContext_Header}}
{{APIRef("Service Workers API")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`updatefound`** event of the
{{domxref("ServiceWorkerRegistration")}} interface is fired any time the {{domxref("ServiceWorkerRegistration.installing")}} property acquires a new service worker.

{{AvailableInWorkers}}

## Syntax

Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}}, or set an event handler property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ page-type: web-api-instance-property
browser-compat: api.ServiceWorkerRegistration.updateViaCache
---

{{APIRef("Service Workers API")}}{{SecureContext_Header}}
{{APIRef("Service Workers API")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`updateViaCache`** read-only property of the
{{domxref("ServiceWorkerRegistration")}} interface updates the cache using
the mode specified in the call to {{domxref('ServiceWorkerContainer.register')}}.
Requests for `importScripts` still go via the HTTP cache. `updateViaCache` offers
control over this behavior.

{{AvailableInWorkers}}

## Value

Returns one of the following values:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ page-type: web-api-instance-property
browser-compat: api.ServiceWorkerRegistration.waiting
---

{{APIRef("Service Workers API")}}{{SecureContext_Header}}
{{APIRef("Service Workers API")}}{{SecureContext_Header}} {{AvailableInWorkers}}

The **`waiting`** read-only property of the
{{domxref("ServiceWorkerRegistration")}} interface returns a service worker whose
{{domxref("ServiceWorker.state")}} is `installed`. This property is initially
set to `null`.

{{AvailableInWorkers}}

## Value

A {{domxref("ServiceWorker")}} object, if it is currently in an `installed`
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/storage_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ page-type: web-api-overview
browser-compat: api.StorageManager
---

{{securecontext_header}}{{DefaultAPISidebar("Storage")}}
{{securecontext_header}}{{DefaultAPISidebar("Storage")}} {{AvailableInWorkers}}

The [Storage Standard](https://storage.spec.whatwg.org) defines a shared storage system designed to be used by all APIs and technologies that websites can use to store data in a user's browser.

Expand All @@ -17,8 +17,6 @@ This article gives an overview of the way user agents store and maintain website

This article also gives an overview of the {{domxref("StorageManager")}} interface used to estimate available storage for a site.

{{AvailableInWorkers}}

## Concepts and usage

### Storage buckets
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/storagemanager/estimate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ page-type: web-api-instance-method
browser-compat: api.StorageManager.estimate
---

{{securecontext_header}}{{APIRef("Storage")}}
{{securecontext_header}}{{APIRef("Storage")}} {{AvailableInWorkers}}

The **`estimate()`** method of the {{domxref("StorageManager")}} interface asks the Storage Manager for how much storage the current [origin](/en-US/docs/Glossary/Same-origin_policy) takes up (`usage`), and how much space is available (`quota`).

This method operates asynchronously, so it returns a {{jsxref("Promise")}} which resolves once the information is available. The promise's fulfillment handler is called with an object containing the usage and quota data.

{{AvailableInWorkers}}

## Syntax

```js-nolint
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/storagemanager/getdirectory/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ page-type: web-api-instance-method
browser-compat: api.StorageManager.getDirectory
---

{{securecontext_header}}{{APIRef("File System API")}}
{{securecontext_header}}{{APIRef("File System API")}} {{AvailableInWorkers}}

The **`getDirectory()`** method of the {{domxref("StorageManager")}} interface is used to obtain a reference to a {{domxref("FileSystemDirectoryHandle")}} object allowing access to a directory and its contents, stored in the [origin private file system](/en-US/docs/Web/API/File_System_API/Origin_private_file_system) (OPFS).

{{AvailableInWorkers}}

## Syntax

```js-nolint
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/storagemanager/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ page-type: web-api-interface
browser-compat: api.StorageManager
---

{{securecontext_header}}{{APIRef("Storage")}}
{{securecontext_header}}{{APIRef("Storage")}} {{AvailableInWorkers}}

The **`StorageManager`** interface of the [Storage API](/en-US/docs/Web/API/Storage_API) provides an interface for managing persistence permissions and estimating available storage. You can get a reference to this interface using either {{domxref("navigator.storage")}} or {{domxref("WorkerNavigator.storage")}}.

{{AvailableInWorkers}}

## Instance methods

- {{domxref("StorageManager.estimate()")}}
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/storagemanager/persisted/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ page-type: web-api-instance-method
browser-compat: api.StorageManager.persisted
---

{{securecontext_header}}{{APIRef("Storage")}}
{{securecontext_header}}{{APIRef("Storage")}} {{AvailableInWorkers}}

The **`persisted()`** method of the {{domxref("StorageManager")}} interface returns a {{jsxref('Promise')}} that resolves to `true` if your site's storage bucket is persistent.

{{AvailableInWorkers}}

## Syntax

```js-nolint
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/streams_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ browser-compat:
- api.WritableStream
---

{{DefaultAPISidebar("Streams")}}
{{DefaultAPISidebar("Streams")}} {{AvailableInWorkers}}

The Streams API allows JavaScript to programmatically access streams of data received over the network and process them as desired by the developer.

{{AvailableInWorkers}}

## Concepts and usage

Streaming involves breaking a resource that you want to receive over a network down into small chunks, then processing it bit by bit. Browsers already do this when receiving media assets — videos buffer and play as more of the content downloads, and sometimes you'll see images display gradually as more is loaded too.
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/textdecoder/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ page-type: web-api-interface
browser-compat: api.TextDecoder
---

{{APIRef("Encoding API")}}
{{APIRef("Encoding API")}} {{AvailableInWorkers}}

The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc. A decoder takes a stream of bytes as input and emits a stream of code points.

{{AvailableInWorkers}}

## Constructor

- {{DOMxRef("TextDecoder.TextDecoder", "TextDecoder()")}}
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/textencoder/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ page-type: web-api-interface
browser-compat: api.TextEncoder
---

{{APIRef("Encoding API")}}
{{APIRef("Encoding API")}} {{AvailableInWorkers}}

The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.

{{AvailableInWorkers}}

## Constructor

- {{DOMxRef("TextEncoder.TextEncoder", "TextEncoder()")}}
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/url/hash/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.URL.hash
---

{{ APIRef("URL API") }}
{{ APIRef("URL API") }} {{AvailableInWorkers}}

The **`hash`** property of the
{{domxref("URL")}} interface is a string containing a
Expand All @@ -15,8 +15,6 @@ The **`hash`** property of the
The fragment is not [URL decoded](https://en.wikipedia.org/wiki/URL_encoding). If the URL does not
have a fragment identifier, this property contains an empty string — `""`.

{{AvailableInWorkers}}

## Value

A string.
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/url/host/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ page-type: web-api-instance-property
browser-compat: api.URL.host
---

{{ApiRef("URL API")}}
{{ApiRef("URL API")}} {{AvailableInWorkers}}

The **`host`** property of the {{domxref("URL")}} interface is
a string containing the host, that is the {{domxref("URL.hostname",
"hostname")}}, and then, if the {{glossary("port")}} of the URL is nonempty, a
`':'`, followed by the {{domxref("URL.port", "port")}} of the URL.

{{AvailableInWorkers}}

## Value

A string.
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/url/hostname/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ page-type: web-api-instance-property
browser-compat: api.URL.hostname
---

{{ApiRef("URL API")}}
{{ApiRef("URL API")}} {{AvailableInWorkers}}

The **`hostname`** property of the {{domxref("URL")}} interface
is a string containing the {{glossary("domain name")}} of the URL.

{{AvailableInWorkers}}

## Value

A string.
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/url/href/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ page-type: web-api-instance-property
browser-compat: api.URL.href
---

{{ApiRef("URL API")}}
{{ApiRef("URL API")}} {{AvailableInWorkers}}

The **`href`** property of the {{domxref("URL")}} interface is
a string containing the whole URL.

{{AvailableInWorkers}}

## Value

A string.
Expand Down
Loading

0 comments on commit 4de6f76

Please sign in to comment.