recursal/MDN huggingface dataset:
ExtendableCookieChangeEvent
===========================

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

The **`ExtendableCookieChangeEvent`** interface of the Cookie Store API is the event type passed to `cookiechange` event fired at the `ServiceWorkerGlobalScope` when any cookie changes occur which match the service worker's cookie change subscription list. A cookie change event consists of a cookie and a type. (either "changed" or "deleted")

Cookie changes that cause the `ExtendableCookieChangeEvent` to be dispatched are:

* A cookie is newly created and not immediately removed. In this case `type` is "changed".
* A cookie is newly created and immediately removed. In this case `type` is "deleted"
* A cookie is removed. In this case `type` is "deleted".

**Note:** A cookie that is replaced due to the insertion of another cookie with the same name, domain, and path, is ignored and does not trigger a change event.

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

Event

ExtendableEvent

ExtendableCookieChangeEventConstructor
-----------

`ExtendableCookieChangeEvent()`

Creates a new `ExtendableCookieChangeEvent`.

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

*This interface also inherits properties from `ExtendableEvent`.*

`ExtendableCookieChangeEvent.changed` Read only 

Returns an array containing the changed cookies.

`ExtendableCookieChangeEvent.deleted` Read only 

Returns an array containing the deleted cookies.

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

*This interface also inherits methods from `ExtendableEvent`.*

Examples
--------

In the below example, we use `CookieStoreManager.getSubscriptions()` to get a list of existing subscriptions. (In service workers, a subscription is required in order to listen for events.) We unsubscribe from existing subscriptions using `CookieStoreManager.unsubscribe()`, then subscribe to the cookie with a name of 'COOKIE\_NAME' using `CookieStoreManager.subscribe()`. If that cookie is changed, the event listener logs the event to the console. This will be an `ExtendableCookieChangeEvent` object, with the `changed` or `deleted` property containing the modified cookie.


```js
self.addEventListener("activate", (event) => {
  event.waitUntil(async () => {
    const subscriptions = await self.registration.cookies.getSubscriptions();

    await self.registration.cookies.unsubscribe(subscriptions);

    await self.registration.cookies.subscribe([
      {
        name: "COOKIE\_NAME",
      },
    ]);
  });
});

self.addEventListener("cookiechange", (event) => {
  console.log(event);
});
```

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

| Specification |
| --- |
| Cookie Store API # ExtendableCookieChangeEvent |

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

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

The **`RsaHashedKeyGenParams`** dictionary of the Web Crypto API represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.generateKey()`, when generating any RSA-based key pair: that is, when the algorithm is identified as any of RSASSA-PKCS1-v1\_5, RSA-PSS, or RSA-OAEP.

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

`name`

A string. This should be set to `RSASSA-PKCS1-v1_5`, `RSA-PSS`, or `RSA-OAEP`, depending on the algorithm you want to use.

`modulusLength`

A `Number`. The length in bits of the RSA modulus. This should be at least 2048: see for example see SP 800-131A Rev. 2. Some organizations are now recommending that it should be 4096.

`publicExponent`

A `Uint8Array`. The public exponent. Unless you have a good reason to use something else, specify 65537 here (`[0x01, 0x00, 0x01]`).

`hash`

A string representing the name of the digest function to use. You can pass any of `SHA-256`, `SHA-384`, or `SHA-512` here.

**Warning:** Although you can technically pass `SHA-1` as a value here, this is strongly discouraged as SHA-1 is considered vulnerable.

Examples
--------

See the examples for `SubtleCrypto.generateKey()`.

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

| Specification |
| --- |
| Web Cryptography API # dfn-RsaHashedKeyGenParams |

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

Browsers that support any RSA-based algorithm for the `SubtleCrypto.generateKey()` method will support this type.

See also
--------

* `SubtleCrypto.generateKey()`.
HTMLDataElement
===============

The **`HTMLDataElement`** interface provides special properties (beyond the regular `HTMLElement` interface it also has available to it by inheritance) for manipulating `<data>` elements.

EventTarget

Node

Element

HTMLElement

HTMLDataElementInstance properties
-------------------

*Inherits properties from its parent, `HTMLElement`.*

`HTMLDataElement.value`

A string reflecting the `value` HTML attribute, containing a machine-readable form of the element's value.

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

*No specific method; inherits methods from its parent, `HTMLElement`.*

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

| Specification |
| --- |
| HTML Standard # htmldataelement |

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

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

See also
--------

* The HTML element implementing this interface: `<data>`.
MediaKeySession
===============

The **`MediaKeySession`** interface of the Encrypted Media Extensions API represents a context for message exchange with a content decryption module (CDM).

EventTarget

MediaKeySessionInstance properties
-------------------

`MediaKeySession.closed` Read only 

Returns a `Promise` signaling when a `MediaKeySession` closes. This promise can only be fulfilled and is never rejected. Closing a session means that licenses and keys associated with it are no longer valid for decrypting media data.

`MediaKeySession.expiration` Read only 

The time after which the keys in the current session can no longer be used to decrypt media data, or `NaN` if no such time exists. This value is determined by the CDM and measured in milliseconds since January 1, 1970, UTC. This value may change during a session lifetime, such as when an action triggers the start of a window.

`MediaKeySession.keyStatuses` Read only 

Contains a reference to a read-only `MediaKeyStatusMap` of the current session's keys and their statuses.

`MediaKeySession.sessionId` Read only 

Contains a unique string generated by the CDM for the current media object and its associated keys or licenses.

### Events

`keystatuseschange`

Fires when there has been a change in the keys in a session or their statuses.

`message`

Fires when the content decryption module has generated a message for the session.

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

`MediaKeySession.close()`

Returns a `Promise` after notifying the current media session is no longer needed and that the CDM should release any resources associated with this object and close it.

`MediaKeySession.generateRequest()`

Returns a `Promise` after generating a media request based on initialization data.

`MediaKeySession.load()`

Returns a `Promise` that resolves to a boolean value after loading data for a specified session object.

`MediaKeySession.remove()`

Returns a `Promise` after removing any session data associated with the current object.

`MediaKeySession.update()`

Returns a `Promise` after loading messages and licenses to the CDM.

Examples
--------


```js
// TBD
```

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

| Specification |
| --- |
| Encrypted Media Extensions # mediakeysession-interface |

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

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

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

The **`GPUCompilationMessage`** interface of the WebGPU API represents a single informational, warning, or error message generated by the GPU shader module compiler.

An array of `GPUCompilationMessage` objects is available in the `messages` property of the `GPUCompilationInfo` object accessed via `GPUShaderModule.getCompilationInfo()`.

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

`length` 
Experimental
 Read only 

A number representing the length of the substring that the message corresponds to.

`lineNum` 
Experimental
 Read only 

A number representing the line number in the shader code that the message corresponds to.

`linePos` 
Experimental
 Read only 

A number representing the position in the code line that the message corresponds to. This could be an exact point, or the start of the relevant substring.

`message` 
Experimental
 Read only 

A string representing human-readable message text.

`offset` 
Experimental
 Read only 

A number representing the offset from the start of the shader code to the exact point, or the start of the relevant substring, that the message corresponds to.

`type` 
Experimental
 Read only 

An enumerated value representing the type of the message — `"error"`, `"info"`, or `"warning"`.

Examples
--------

See the main `GPUCompilationInfo` page for an example.

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

| Specification |
| --- |
| WebGPU # gpucompilationmessage |

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

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

See also
--------

* The WebGPU API
CSSLayerBlockRule
=================

Baseline 2022
-------------

Newly availableSince March 2022, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

* Learn more
* See full compatibility
* Report feedback
The **`CSSLayerBlockRule`** represents a `@layer` block rule. It is a grouping at-rule meaning that it can contain other rules, and is associated to a given cascade layer, identified by its *name*.

CSSRule

CSSGroupingRule

CSSLayerBlockRuleInstance properties
-------------------

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

* `CSSLayerBlockRule.name` Read only 
    + A string containing the name of the associated cascade layer.
Instance methods
----------------

*Inherits methods from its parent interface, `CSSGroupingRule`.*

Examples
--------

### HTML


```html
<p>I am displayed in <code>color: rebeccapurple</code>.</p>
```

### CSS


```css
@layer special {
  p {
    color: rebeccapurple;
  }
}
```

### JavaScript


```js
const item = document.getElementsByTagName("p")[0];
const rules = document.styleSheets[1].cssRules;
// Note that stylesheet #1 is the stylesheet associated with this embedded example,
// while stylesheet #0 is the stylesheet associated with the whole MDN page

const layer = rules[0]; // A CSSLayerBlockRule

item.textContent = `The CSSLayerBlockRule is for the "${layer.name}" layer`;
```

### Result

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

| Specification |
| --- |
| CSS Cascading and Inheritance Level 5 # csslayerblockrule |

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

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

See also
--------

* `@layer`
* `CSSLayerStatementRule`
* Learn CSS cascade layers
SVGGradientElement
==================

The **`SVGGradient`** interface is a base interface used by `SVGLinearGradientElement` and `SVGRadialGradientElement`.

EventTarget

Node

Element

SVGElement

SVGGradientElementConstants
---------

| Name | Value | Description |
| --- | --- | --- |
| `SVG_SPREADMETHOD_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_SPREADMETHOD_PAD` | 1 | Corresponds to value *pad*. |
| `SVG_SPREADMETHOD_REFLECT` | 2 | Corresponds to value *reflect*. |
| `SVG_SPREADMETHOD_REPEAT` | 3 | Corresponds to value *repeat*. |

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

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

`SVGGradientElement.href` Read only 

An `SVGAnimatedString` corresponding to the `href` or `xlink:href` 
Deprecated
 attribute of the given element.

`SVGGradientElement.gradientUnits` Read only 

An `SVGAnimatedEnumeration` corresponding to the `gradientUnits` attribute on the given element. This property takes one of the constants defined in `SVGUnitTypes`.

`SVGGradientElement.gradientTransform` Read only 

An `SVGAnimatedTransformList` corresponding to the `gradientTransform` attribute on the given element.

`SVGGradientElement.spreadMethod` Read only 

An `SVGAnimatedEnumeration` corresponding to the `spreadMethod` attribute on the given element. One of the spread method types defined on this interface.

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

*This interface does not provide any specific methods, but implements those of its parent, `SVGElement`.*

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

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

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

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

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

The WebXR Device API interface **`XRInputSourcesChangeEvent`** is used to represent the `inputsourceschange` event sent to an `XRSession` when the set of available WebXR input controllers changes.

Event

XRInputSourcesChangeEventConstructor
-----------

`XRInputSourcesChangeEvent()`

Creates and returns a new `XRInputSourcesChangeEvent` object. The specified type must be `inputsourceschange`, which is the only event that uses this interface.

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

`added` Read only 

An array of zero or more `XRInputSource` objects, each representing an input device which has been newly connected or enabled for use.

`removed` Read only 

An array of zero or more `XRInputSource` objects representing the input devices newly connected or enabled for use.

`session` Read only 

The `XRSession` to which this input source change event is being directed.

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

*While `XRInputSourcesChangeEvent` defines no methods of its own, it inherits methods from its parent interface, `Event`.*

Event types
-----------

`inputsourceschange`

Delivered to the `XRSession` when the set of input devices available to it changes.

Examples
--------

The following example shows how to set up an event handler which uses `inputsourceschange` events to detect newly-available pointing devices and to load their models in preparation to display them in the next animation frame.


```js
xrSession.addEventListener("inputsourceschange", onInputSourcesChange);

function onInputSourcesChange(event) {
  for (const input of event.added) {
    if (input.targetRayMode === "tracked-pointer") {
      loadControllerMesh(input);
    }
  }
}
```


You can also add a handler for `inputsourceschange` events by setting the `oninputsourceschange` event handler:


```js
xrSession.oninputsourceschange = onInputSourcesChange;
```

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

| Specification |
| --- |
| WebXR Device API # xrinputsourceschangeevent-interface |

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

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

The **`IDBFactory`** interface of the IndexedDB API lets applications asynchronously access the indexed databases. The object that implements the interface is `window.indexedDB`. You open — that is, create and access — and delete a database with this object, and not directly with `IDBFactory`.

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

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

`IDBFactory.open`

The current method to request opening a connection to a database.

`IDBFactory.deleteDatabase`

A method to request the deletion of a database.

`IDBFactory.cmp`

A method that compares two keys and returns a result indicating which one is greater in value.

`IDBFactory.databases`

A method that returns a list of all available databases, including their names and versions.

Example
-------

In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live).


```js
// Let us open version 4 of our database
const DBOpenRequest = window.indexedDB.open("toDoList", 4);

// these two event handlers act on the database being opened successfully, or not
DBOpenRequest.onerror = (event) => {
  console.error("Error loading database.");
};

DBOpenRequest.onsuccess = (event) => {
  console.info("Database initialized.");

  // store the result of opening the database in the db variable. This is used a lot later on, for opening transactions and suchlike.
  db = DBOpenRequest.result;
};
```

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

| Specification |
| --- |
| Indexed Database API 3.0 # factory-interface |

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

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

See also
--------

* Using IndexedDB
* Starting transactions: `IDBDatabase`
* Using transactions: `IDBTransaction`
* Setting a range of keys: `IDBKeyRange`
* Retrieving and making changes to your data: `IDBObjectStore`
* Using cursors: `IDBCursor`
* Reference example: To-do Notifications (View the example live).
GeolocationCoordinates
======================

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

 The **`GeolocationCoordinates`** interface represents the position and altitude of the device on Earth, as well as the accuracy with which these properties are calculated.
 The geographic position information is provided in terms of World Geodetic System coordinates (WGS84).

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

*The `GeolocationCoordinates` interface doesn't inherit any properties.*

`GeolocationCoordinates.latitude` Read only 

Returns a `double` representing the position's latitude in decimal degrees.

`GeolocationCoordinates.longitude` Read only 

Returns a `double` representing the position's longitude in decimal degrees.

`GeolocationCoordinates.altitude` Read only 

Returns a `double` representing the position's altitude in meters, relative to nominal sea level. This value can be `null` if the implementation cannot provide the data.

`GeolocationCoordinates.accuracy` Read only 

Returns a `double` representing the accuracy of the `latitude` and `longitude` properties, expressed in meters.

`GeolocationCoordinates.altitudeAccuracy` Read only 

Returns a `double` representing the accuracy of the `altitude` expressed in meters. This value can be `null` if the implementation cannot provide the data.

`GeolocationCoordinates.heading` Read only 

Returns a `double` representing the direction towards which the device is facing. This value, specified in degrees, indicates how far off from heading true north the device is. `0` degrees represents true north, and the direction is determined clockwise (which means that east is `90` degrees and west is `270` degrees). If `speed` is `0`, `heading` is `NaN`. If the device is unable to provide `heading` information, this value is `null`.

`GeolocationCoordinates.speed` Read only 

Returns a `double` representing the velocity of the device in meters per second. This value can be `null`.

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

*The `GeolocationCoordinates` interface neither implements, nor inherits any method.*

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

| Specification |
| --- |
| Geolocation API # coordinates\_interface |

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

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

See also
--------

* Using the Geolocation API
* `Geolocation`
BluetoothRemoteGATTDescriptor
=============================

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

 The `BluetoothRemoteGATTDescriptor` interface of the Web Bluetooth API provides a GATT Descriptor,
 which provides further information about a characteristic's value.

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

`BluetoothRemoteGATTDescriptor.characteristic` Read only  
Experimental

 Returns the `BluetoothRemoteGATTCharacteristic` this descriptor belongs
 to.


`BluetoothRemoteGATTDescriptor.uuid` Read only  
Experimental

 Returns the UUID of the characteristic descriptor, for
 example '`00002902-0000-1000-8000-00805f9b34fb`' for theClient
 Characteristic Configuration descriptor.


`BluetoothRemoteGATTDescriptor.value` Read only  
Experimental

 Returns the currently cached descriptor value. This value gets updated when the
 value of the descriptor is read.


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

`BluetoothRemoteGATTDescriptor.readValue()` 
Experimental

 Returns a `Promise` that resolves to
 an `ArrayBuffer` holding a duplicate of the `value` property
 if it is available and supported. Otherwise it throws an error.


`BluetoothRemoteGATTDescriptor.writeValue()` 
Experimental

 Sets the value property to the bytes contained in an `ArrayBuffer` and
 returns a `Promise`.


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

| Specification |
| --- |
| Web Bluetooth # bluetoothgattdescriptor-interface |

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

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

The **`EcdsaParams`** dictionary of the Web Crypto API represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.

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

`name`

A string. This should be set to `ECDSA`.

`hash`

A string. An identifier for the digest algorithm to use. This should be one of the following:

* `SHA-256`: selects the SHA-256 algorithm.
* `SHA-384`: selects the SHA-384 algorithm.
* `SHA-512`: selects the SHA-512 algorithm.

**Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.

Examples
--------

See the examples for `SubtleCrypto.sign()` or `SubtleCrypto.verify()`.

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

| Specification |
| --- |
| Web Cryptography API # SubtleCrypto-method-sign |
| Web Cryptography API # SubtleCrypto-method-verify |

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

Browsers that support the "ECDSA" algorithm for the `SubtleCrypto.sign()` and `SubtleCrypto.verify()` methods will support this type.

### api.SubtleCrypto.sign

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

### api.SubtleCrypto.verify

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

See also
--------

* `SubtleCrypto.sign()` and `SubtleCrypto.verify()`.