recursal/MDN huggingface dataset:
PeriodicSyncManager
===================

**Experimental:** **This is an experimental technology**  
Check the Browser compatibility table carefully before using this in production.

The **`PeriodicSyncManager`** interface of the Web Periodic Background Synchronization API provides a way to register tasks to be run in a service worker at periodic intervals with network connectivity. These tasks are referred to as periodic background sync requests. Access `PeriodicSyncManager` through the `ServiceWorkerRegistration.periodicSync`.

Instance properties
-------------------

None.

Instance methods
----------------

`PeriodicSyncManager.register()` 
Experimental

Registers a periodic sync request with the browser with the specified tag and options. Returns a `Promise` that resolves when the registration completes.

`PeriodicSyncManager.getTags()` 
Experimental

Returns a `Promise` that resolves with a list of `strings` representing the tags that are currently registered for periodic syncing.

`PeriodicSyncManager.unregister()` 
Experimental

Unregisters the periodic sync request corresponding to the specified tag and returns a `Promise` that resolves when unregistration completes.

Examples
--------

The following examples show how to use the interface.

### Requesting a Periodic Background Sync

The following asynchronous function registers a periodic background sync at a minimum interval of one day from a browsing context:


```js
async function registerPeriodicNewsCheck() {
  const registration = await navigator.serviceWorker.ready;
  try {
    await registration.periodicSync.register("get-latest-news", {
      minInterval: 24 \* 60 \* 60 \* 1000,
    });
  } catch {
    console.log("Periodic Sync could not be registered!");
  }
}
```

### Verifying a Background Periodic Sync by Tag

This code checks to see if a Periodic Background Sync task with a given tag is registered.


```js
navigator.serviceWorker.ready.then((registration) => {
  registration.periodicSync.getTags().then((tags) => {
    if (tags.includes("get-latest-news")) skipDownloadingLatestNewsOnPageLoad();
  });
});
```

### Removing a Periodic Background Sync Task

The following code removes a Periodic Background Sync task to stop articles syncing in the background.


```js
navigator.serviceWorker.ready.then((registration) => {
  registration.periodicSync.unregister("get-latest-news");
});
```

Specifications
--------------

| Specification |
| --- |
| Web Periodic Background Synchronization # periodicsyncmanager-interface |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Richer offline experiences with the Periodic Background Sync API
* A Periodic Background Sync demo app
SpeechRecognitionErrorEvent
===========================

The **`SpeechRecognitionErrorEvent`** interface of the Web Speech API represents error messages from the recognition service.

Event

SpeechRecognitionErrorEventInstance properties
-------------------

*`SpeechRecognitionErrorEvent` also inherits properties from its parent interface, `Event`.*

`SpeechRecognitionErrorEvent.error` Read only 

Returns the type of error raised.

`SpeechRecognitionErrorEvent.message` Read only 

Returns a message describing the error in more detail.

Examples
--------


```js
const recognition = new SpeechRecognition();

recognition.onerror = (event) => {
  console.log(`Speech recognition error detected: ${event.error}`);
  console.log(`Additional information: ${event.message}`);
};
```

Specifications
--------------

| Specification |
| --- |
| Web Speech API # speechrecognitionerrorevent |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Web Speech API
CSSMathSum
==========

The **`CSSMathSum`** interface of the CSS\_Object\_Model#css\_typed\_object\_model represents the result obtained by calling `add()`, `sub()`, or `toSum()` on `CSSNumericValue`.

A CSSMathSum is the object type returned when the `StylePropertyMapReadOnly.get()` method is used on a CSS property whose value is created with a `calc()` function.

CSSStyleValue

CSSNumericValue

CSSMathValue

CSSMathSumConstructor
-----------

`CSSMathSum()` 
Experimental

Creates a new `CSSMathSum` object.

Instance properties
-------------------

`CSSMathSum.values`

Returns a `CSSNumericArray` object which contains one or more `CSSNumericValue` objects.

Static methods
--------------

*The interface may also inherit methods from its parent interface, `CSSMathValue`.*

Instance methods
----------------

*The interface may also inherit methods from its parent interface, `CSSMathValue`.*

Event handlers
--------------

No

Examples
--------

We create an element with a `width` determined using a `calc()` function, then `console.log()` the `operator` and `values`, and dig into the values a bit.


```html
<div>has width</div>
```


We assign a `width`


```css
div {
  width: calc(30% - 20px);
}
```


We add the JavaScript


```js
const styleMap = document.querySelector("div").computedStyleMap();

console.log(styleMap.get("width")); // CSSMathSum {values: CSSNumericArray, operator: "sum"}
console.log(styleMap.get("width").operator); // 'sum'
console.log(styleMap.get("width").values); // CSSNumericArray {0: CSSUnitValue, 1: CSSUnitValue, length: 2}
console.log(styleMap.get("width").values[0]); // CSSUnitValue {value: 30, unit: "percent"}
console.log(styleMap.get("width").values[0].value); // 30
console.log(styleMap.get("width").values[0].unit); // 'percent'
console.log(styleMap.get("width").values[1]); // CSSUnitValue {value: -20, unit: "px"}
console.log(styleMap.get("width").values[1].value); // -20
console.log(styleMap.get("width").values[1].unit); // 'px'
```


The specification is still evolving. In the future we may write the last three lines as:


```js
console.log(styleMap.get("width").values[1]); // CSSMathNegate {value: CSSUnitValue, operator: "negate"}
console.log(styleMap.get("width").values[1].value); // CSSUnitValue {value: 20, unit: "px"}
console.log(styleMap.get("width").values[1].value.unit); // 'px'
```

Specifications
--------------

| Specification |
| --- |
| CSS Typed OM Level 1 # cssmathsum |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
WebGLRenderbuffer
=================

The **WebGLRenderbuffer** interface is part of the WebGL API and represents a buffer that can contain an image, or that can be a source or target of a rendering operation.

WebGLObject

WebGLRenderbufferDescription
-----------

The `WebGLRenderbuffer` object does not define any methods or properties of its own and its content is not directly accessible. When working with `WebGLRenderbuffer` objects, the following methods of the `WebGLRenderingContext` are useful:

* `WebGLRenderingContext.bindRenderbuffer()`
* `WebGLRenderingContext.createRenderbuffer()`
* `WebGLRenderingContext.deleteRenderbuffer()`
* `WebGLRenderingContext.isRenderbuffer()`
Examples
--------

### Creating a render buffer


```js
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const buffer = gl.createRenderbuffer();
```

Specifications
--------------

| Specification |
| --- |
| WebGL Specification # 5.7 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLRenderingContext.bindRenderbuffer()`
* `WebGLRenderingContext.createRenderbuffer()`
* `WebGLRenderingContext.deleteRenderbuffer()`
* `WebGLRenderingContext.isRenderbuffer()`
* Other buffers: `WebGLBuffer`, `WebGLFramebuffer`
NotificationEvent
=================

The **`NotificationEvent`** interface of the Notifications API represents a notification event dispatched on the `ServiceWorkerGlobalScope` of a `ServiceWorker`.

This interface inherits from the `ExtendableEvent` interface.

> 
> **Note**: Only persistent notification events, fired at the `ServiceWorkerGlobalScope` object, implement the `NotificationEvent` interface. Non-persistent notification events, fired at the `Notification` object, implement the `Event` interface.
> 
> 
> 

Event

ExtendableEvent

NotificationEventConstructor
-----------

`NotificationEvent()`

Creates a new `NotificationEvent` object.

Instance properties
-------------------

*Also inherits properties from its parent interface, `ExtendableEvent`*.

`NotificationEvent.notification` Read only 

Returns a `Notification` object representing the notification that was clicked to fire the event.

`NotificationEvent.action` Read only 

Returns the string ID of the notification button the user clicked. This value returns an empty string if the user clicked the notification somewhere other than an action button, or the notification does not have a button.

Instance methods
----------------

*Also inherits methods from its parent interface, `ExtendableEvent`*.

Example
-------


```js
self.addEventListener("notificationclick", (event) => {
  console.log(`On notification click: ${event.notification.tag}`);
  event.notification.close();

  // This looks to see if the current is already open and
  // focuses if it is
  event.waitUntil(
    clients
      .matchAll({
        type: "window",
      })
      .then((clientList) => {
        for (const client of clientList) {
          if (client.url === "/" && "focus" in client) return client.focus();
        }
        if (clients.openWindow) return clients.openWindow("/");
      }),
  );
});
```

Specifications
--------------

| Specification |
| --- |
| Notifications API Standard # notificationevent |

**Note:** This interface is specified in the Notifications API, but accessed through `ServiceWorkerGlobalScope`.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
DOMError
========

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The **`DOMError`** interface describes an error object that contains an error name.

Instance properties
-------------------

`DOMError.name` Read only  
Deprecated

Returns a string representing one of the error type names (see below).

`DOMError.message` Read only  
Deprecated

Returns a string representing a message or description associated with the given error type name.

Error types
-----------

| Type | Description |
| --- | --- |
| `IndexSizeError` | The index is not in the allowed range (e.g. thrown in a `range` object). |
| `HierarchyRequestError` | The node tree hierarchy is not correct. |
| `WrongDocumentError` | The object is in the wrong `document`. |
| `InvalidCharacterError` | The string contains invalid characters. |
| `NoModificationAllowedError` | The object can not be modified. |
| `NotFoundError` | The object can not be found here. |
| `NotSupportedError` | The operation is not supported |
| `InvalidStateError` | The object is in an invalid state. |
| `SyntaxError` | The string did not match the expected pattern. |
| `InvalidModificationError` | The object can not be modified in this way. |
| `NamespaceError` | The operation is not allowed by Namespaces in XML |
| `InvalidAccessError` | The object does not support the operation or argument. |
| `TypeMismatchError` | The type of the object does not match the expected type. |
| `SecurityError` | The operation is insecure. |
| `NetworkError` | A network error occurred. |
| `AbortError` | The operation was aborted. |
| `URLMismatchError` | The given URL does not match another URL. |
| `QuotaExceededError` | The quota has been exceeded. |
| `TimeoutError` | The operation timed out. |
| `InvalidNodeTypeError` | The node is incorrect or has an incorrect ancestor for this operation. |
| `DataCloneError` | The object can not be cloned. |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `DOMException`
SVGAnimatedString
=================

The **`SVGAnimatedString`** interface represents string attributes which can be animated from each SVG declaration. You need to create SVG attribute before doing anything else, everything should be declared inside this.

Instance properties
-------------------

`SVGAnimatedString.animVal` Read only 

This is a string representing the animation value. If the given attribute or property is being animated it contains the current animated value of the attribute or property. If the given attribute or property is not currently being animated, it contains the same value as baseVal.

`SVGAnimatedString.baseVal`

This is a string representing the base value. The base value of the given attribute before applying any animations. Setter throws DOMException.

Instance methods
----------------

*The `SVGAnimatedString` interface do not provide any specific methods.*

Specifications
--------------

| Specification |
| --- |
| Scalable Vector Graphics (SVG) 2 # InterfaceSVGAnimatedString |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
SVGRenderingIntent
==================

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The **`SVGRenderingIntent`** interface defines the enumerated list of possible values for `rendering-intent` attributes or descriptors.

**Warning:** This interface was removed in the SVG 2 specification.

Constants
---------

| Name | Value | Description |
| --- | --- | --- |
| `RENDERING_INTENT_UNKNOWN` | 0 | 
 The type is not one of predefined types. It is invalid to attempt to
 define a new value of this type or to attempt to switch an existing
 value to this type.
  |
| `RENDERING_INTENT_AUTO` | 1 | Corresponds to the value `auto`. |
| `RENDERING_INTENT_PERCEPTUAL` | 2 | Corresponds to the value `perceptual`. |
| `RENDERING_INTENT_RELATIVE_COLORIMETRIC` | 3 | Corresponds to the value `relative-colorimetric`. |
| `RENDERING_INTENT_SATURATION` | 4 | Corresponds to the value `saturation`. |
| `RENDERING_INTENT_ABSOLUTE_COLORIMETRIC` | 5 | Corresponds to the value `absolute-colorimetric`. |

Instance properties
-------------------

*This interface doesn't implement any specific properties.*

Instance methods
----------------

*This interface doesn't implement any specific methods.*

Specifications
--------------

| Specification |
| --- |
| Scalable Vector Graphics (SVG) 1.1 (Second Edition) # InterfaceSVGRenderingIntent |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `rendering-intent`
Server-sent events
==================

Traditionally, a web page has to send a request to the server to receive new data; that is, the page requests data from the server. With server-sent events, it's possible for a server to send new data to a web page at any time, by pushing messages to the web page. These incoming messages can be treated as *Events + data* inside the web page.

**Note:** This feature is available in Web Workers

**Note:** Firefox does not currently support the use of server-sent events in service workers (it does support them in dedicated and shared workers). See Firefox bug 1681218.

Concepts and usage
------------------

To learn how to use server-sent events, see our article Using server-sent events.

Interfaces
----------

`EventSource`

Defines all the features that handle connecting to a server, receiving events/data, errors, closing a connection, etc.

Examples
--------

* Simple SSE demo using PHP
Specifications
--------------

| Specification |
| --- |
| HTML Standard # server-sent-events |

See also
--------

### Tools

* Mercure: a real-time communication protocol (publish-subscribe) built on top of SSE
* EventSource polyfill for Node.js
* Remy Sharp's EventSource polyfill
* Yaffle's EventSource polyfill
* Rick Waldron's jquery plugin
* intercooler.js declarative SSE support
### Related Topics

* Fetching data from the server
* JavaScript
* WebSockets
### Other resources

* A Twitter like application powered by server-sent events and its code on GitHub.
LockManager
===========

**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The **`LockManager`** interface of the Web Locks API provides methods for requesting a new `Lock` object and querying for an existing `Lock` object. To get an instance of `LockManager`, call `navigator.locks`.

**Note:** This feature is available in Web Workers

Instance methods
----------------

`LockManager.request()`

Requests a `Lock` object with parameters specifying its name and characteristics.

`LockManager.query()`

Returns a `Promise` that resolves with an object that contains information about held and pending locks.

Specifications
--------------

| Specification |
| --- |
| Web Locks API # api-lock-manager |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
SVGFEGaussianBlurElement
========================

The **`SVGFEGaussianBlurElement`** interface corresponds to the `<feGaussianBlur>` element.

EventTarget

Node

Element

SVGElement

SVGFEGaussianBlurElementInstance properties
-------------------

*This interface also inherits properties from its parent interface, `SVGElement`.*

`SVGFEGaussianBlurElement.edgeMode` Read only 

An `SVGAnimatedEnumeration` corresponding to the `edgeMode` attribute of the given element. Returns two identical values that are one of the following values:

`SVG_EDGEMODE_UNKNOWN` (0)

The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

`SVG_EDGEMODE_DUPLICATE` (1)

Corresponds to the `duplicate` value.

`SVG_EDGEMODE_WRAP` (2)

Corresponds to the `wrap` value.

`SVG_EDGEMODE_NONE` (3)

Corresponds to `none` value.


`SVGFEGaussianBlurElement.height` Read only 

An `SVGAnimatedLength` corresponding to the `height` attribute of the given element.

`SVGFEGaussianBlurElement.in1` Read only 

An `SVGAnimatedString` corresponding to the `in` attribute of the given element.

`SVGFEGaussianBlurElement.result` Read only 

An `SVGAnimatedString` corresponding to the `result` attribute of the given element.

`SVGFEGaussianBlurElement.stdDeviationX` Read only 

An `SVGAnimatedNumber` corresponding to the (possibly automatically computed) X component of the `stdDeviation` attribute of the given element.

`SVGFEGaussianBlurElement.stdDeviationY` Read only 

An `SVGAnimatedNumber` corresponding to the (possibly automatically computed) Y component of the `stdDeviation` attribute of the given element.

`SVGFEGaussianBlurElement.width` Read only 

An `SVGAnimatedLength` corresponding to the `width` attribute of the given element.

`SVGFEGaussianBlurElement.x` Read only 

An `SVGAnimatedLength` corresponding to the `x` attribute of the given element.

`SVGFEGaussianBlurElement.y` Read only 

An `SVGAnimatedLength` corresponding to the `y` attribute of the given element.

Instance methods
----------------

*This interface also inherits methods of its parent, `SVGElement`.*

`SVGFEGaussianBlurElement.setStdDeviation()`

Sets the values for the `stdDeviation` attribute.

Specifications
--------------

| Specification |
| --- |
| Filter Effects Module Level 1 # InterfaceSVGFEGaussianBlurElement |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `<feGaussianBlur>`
CSSFontFaceRule
===============

The **`CSSFontFaceRule`** interface represents an `@font-face` at-rule.

CSSRule

CSSFontFaceRuleInstance properties
-------------------

*Inherits properties from its ancestor `CSSRule`.*

`CSSFontFaceRule.style` Read only 

Returns a `CSSStyleDeclaration`.

Instance methods
----------------

*Inherits methods from its ancestor `CSSRule`.*

Examples
--------

This example uses the CSS found as an example on the `@font-face` page. The first `CSSRule` returned will be a `CSSFontFaceRule`.


```css
@font-face {
  font-family: MyHelvetica;
  src: local("Helvetica Neue Bold"), local("HelveticaNeue-Bold"),
    url(MgOpenModernaBold.ttf);
  font-weight: bold;
}
```



```js
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0]); //a CSSFontFaceRule
```

Specifications
--------------

| Specification |
| --- |
| CSS Fonts Module Level 4 # om-fontface |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
AudioSinkInfo
=============

**Experimental:** **This is an experimental technology**  
Check the Browser compatibility table carefully before using this in production.

The **`AudioSinkInfo`** interface of the Web Audio API represents information describing an `AudioContext`'s sink ID, retrieved via `AudioContext.sinkId`.

Instance properties
-------------------

`type` Read only  
Experimental

Returns the type of the audio output device.

Examples
--------

If a new `AudioContext` is created with a `sinkId` value of `{ type: 'none' }`, calling `AudioContext.sinkId` later in the code will return a `AudioSinkInfo` object containing `type: 'none'`. This is currently the only value available.


```js
audioCtx = new window.AudioContext({
  sinkId: { type: "none" },
});

// ...

audioCtx.sinkId;
```

Specifications
--------------

| Specification |
| --- |
| Web Audio API # AudioSinkInfo |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* SetSinkId test example
* `AudioContext.setSinkId()`
* `AudioContext.sinkId`
* `sinkchange`