recursal/MDN huggingface dataset:
AuthenticatorAttestationResponse: attestationObject property
============================================================

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

 The **`attestationObject`** property of the
 `AuthenticatorAttestationResponse` interface returns an
 `ArrayBuffer` containing the new public key, as well as signature over the
 entire `attestationObject` with a private key that is stored in the
 authenticator when it is manufactured.

 As part of the `CredentialsContainer.create()` call, an authenticator will
 create a new keypair as well as an `attestationObject` for that keypair. The public key
 that corresponds to the private key that has created the attestation signature is well
 known; however, there are various well known attestation public key chains for different
 ecosystems (for example, Android or TPM attestations).

Value
-----

 After decoding the CBOR encoded
 `ArrayBuffer`, the resulting JavaScript object will contain the following
 properties:

`authData`

The Authenticator data for the operation. Note that in `AuthenticatorAssertionResponse`, the `authenticatorData` is exposed as a property in a JavaScript object (see `AuthenticatorAssertionResponse.authenticatorData`) while in `AuthenticatorAttestationResponse`, the `authenticatorData` is a property in a CBOR map.

The same `AuthenticatorAssertionResponse.authenticatorData` field is used by both `AuthenticatorAttestationResponse` and by `AuthenticatorAssertionResponse`. When used in attestation, it contains an optional field, `attestedCredentialData`. This field is not included when used in the `AuthenticatorAssertionResponse`. The attestedCredentialData field contains the `credentialId` and `credentialPublicKey`.

`fmt`

 A text string that indicates the format of the attStmt. The WebAuthn specification defines a number of formats; however, formats may also be defined
 in other specifications and registered in an IANA registry. Formats
 defined by WebAuthn are:


* `"packed"`
* `"tpm"`
* `"android-key"`
* `"android-safetynet"`
* `"fido-u2f"`
* `"none"`

`attStmt`

 An attestation statement that is of the format defined by `"fmt"`. For
 now, see the WebAuthn specification for details on each format.


Examples
--------

See Creating a public key credential using the WebAuthn API for a detailed example.

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

| Specification |
| --- |
| Web Authentication: An API for accessing Public Key Credentials - Level 3 # dom-authenticatorattestationresponse-attestationobject |

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

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

See also
--------

* `CredentialsContainer.create()`: the method used to create a statement with
 a cryptographic `challenge` which signature by the authenticator is contained in `attStmt`,
 with the specified `attestation` transport option.
AuthenticatorAttestationResponse: getPublicKey() method
=======================================================

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

The **`getPublicKey()`** method of the `AuthenticatorAttestationResponse` interface returns an `ArrayBuffer` containing the DER `SubjectPublicKeyInfo` of the new credential (see Subject Public Key Info), or `null` if this is not available.

This is a convenience function, created to allow easy access to the public key. This key will need to be stored in order to verify future authentication operations (i.e., using `navigator.credentials.get()`).

Syntax
------


```js
getPublicKey()
```

### Parameters

None.

### Return value

An `ArrayBuffer` containing the DER `SubjectPublicKeyInfo` of the new credential (see Subject Public Key Info), or `null` if this is not available.

Examples
--------

See Creating a public key credential using the WebAuthn API for a detailed example.

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

| Specification |
| --- |
| Web Authentication: An API for accessing Public Key Credentials - Level 3 # dom-authenticatorattestationresponse-getpublickey |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PushSubscription: toJSON() method
=================================

 The `toJSON()` method of the `PushSubscription` interface is a
 standard serializer: it returns a JSON representation of the subscription properties,
 providing a useful shortcut.

Syntax
------


```js
toJSON()
```

### Parameters

None.

### Return value

 A JSON object. It contains the subscription endpoint, `expirationTime` and public keys, as an
 `endpoint` member, an `expirationTime` member and a `keys` member.

Examples
--------


```js
navigator.serviceWorker.ready.then((reg) => {
  reg.pushManager.getSubscription().then((subscription) => {
    const mySubscription = subscription.toJSON();
    // do something with subscription details
  });
});
```

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

| Specification |
| --- |
| Push API # dom-pushsubscription-tojson |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PushSubscription: getKey() method
=================================

 The `getKey()` method of the `PushSubscription` interface
 returns an `ArrayBuffer` representing a client public key, which can then
 be sent to a server and used in encrypting push message data.

Syntax
------


```js
getKey(name)
```

### Parameters

`name`

 A string representing the encryption method used to generate a
 client key. The value can be:


`p256dh`

 An Elliptic curve Diffie–Hellman public key on the P-256 curve (that is, the NIST
 secp256r1 elliptic curve). The resulting key is an uncompressed point in ANSI
 X9.62 format.


`auth`

An authentication secret, as described in Message Encryption for Web Push.


### Return value

An `ArrayBuffer` or `null` if no public key can be found.

Examples
--------


```js
reg.pushManager.getSubscription().then((subscription) => {
  // Enable any UI which subscribes / unsubscribes from
  // push messages.

  subBtn.disabled = false;

  if (!subscription) {
    console.log("Not yet subscribed to Push");
    // We aren't subscribed to push, so set UI
    // to allow the user to enable push
    return;
  }

  // Set your UI to show they have subscribed for
  // push messages
  subBtn.textContent = "Unsubscribe from Push Messaging";
  isPushEnabled = true;

  // initialize status, which includes setting UI elements for subscribed status
  // and updating Subscribers list via push
  const endpoint = subscription.endpoint;
  const key = subscription.getKey("p256dh");
  const auth = subscription.getKey("auth");

  // ...
});
```

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

| Specification |
| --- |
| Push API # dom-pushsubscription-getkey |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PushSubscription: unsubscribe() method
======================================

 The `unsubscribe()` method of the `PushSubscription` interface
 returns a `Promise` that resolves to a boolean value when the
 current subscription is successfully unsubscribed.

Syntax
------


```js
unsubscribe()
```

### Parameters

None.

### Return value

 A `Promise` that resolves to a boolean value when the current
 subscription is successfully unsubscribed.

Examples
--------


```js
navigator.serviceWorker.ready.then((reg) => {
  reg.pushManager.getSubscription().then((subscription) => {
    subscription
      .unsubscribe()
      .then((successful) => {
        // You've successfully unsubscribed
      })
      .catch((e) => {
        // Unsubscribing failed
      });
  });
});
```

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

| Specification |
| --- |
| Push API # dom-pushsubscription-unsubscribe |

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

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

See also
--------

* `PushManager.getSubscription`
PushSubscription: endpoint property
===================================

 The **`endpoint`** read-only property of the
 `PushSubscription` interface returns a string containing
 the endpoint associated with the push subscription.

 The endpoint 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. For this reason, it is a good idea to keep your endpoint a secret, so
 others do not hijack it and abuse the push functionality.

Value
-----

A string.

Examples
--------


```js
navigator.serviceWorker.ready.then((reg) => {
  reg.pushManager.subscribe({ userVisibleOnly: true }).then((subscription) => {
    console.log(subscription.endpoint);

    // At this point you would most likely send the subscription
    // endpoint to your server, save it, then use it to send a
    // push message at a later date
  });
});
```

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

| Specification |
| --- |
| Push API # dom-pushsubscription-endpoint |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PushSubscription: options property
==================================

 The **`options`** read-only property
 of the `PushSubscription` interface is an object containing the options
 used to create the subscription.

Value
-----

An read-only `PushSubscriptionOptions` object containing the following values:

`userVisibleOnly`

 A boolean, indicating that the returned push
 subscription will only be used for messages whose effect is made visible to the user.


`applicationServerKey`

 A public key your push server will use to send
 messages to client apps via a push server. This value is part of a signing key pair
 generated by your application server, and usable with elliptic curve digital signature
 (ECDSA), over the P-256 curve.


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

| Specification |
| --- |
| Push API # dom-pushsubscription-options |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PushSubscription: expirationTime property
=========================================

 The **`expirationTime`** read-only property of the
 `PushSubscription` interface returns a `DOMHighResTimeStamp`
 of the subscription expiration time associated with the push subscription, if there is
 one, or `null` otherwise.

Value
-----

A `DOMHighResTimeStamp` or `null`.

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

| Specification |
| --- |
| Push API # dom-pushsubscription-expirationtime |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PushSubscription: subscriptionId property
=========================================

**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 **`subscriptionId`** read-only property of the
 `PushSubscription` interface returns a string containing
 the subscription ID associated with the push subscription.

**Warning:** Instead of this feature, use the `PushSubscription.endpoint` property on the same interface.

Value
-----

A string.

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

This feature was removed from the Push API specification. It is no longer on track to become a standard.

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
PerformanceServerTiming: name property
======================================

 The **`name`** read-only property returns a
 string value of the server-specified metric name.

Value
-----

A string.

Examples
--------

### Logging server timing entries

Server timing metrics require the server to send the `Server-Timing` header. For example:


```http
Server-Timing: cache;desc="Cache Read";dur=23.2
```


The `serverTiming` entries can live on `navigation` and `resource` entries.

Example using a `PerformanceObserver`, which notifies of new `navigation` and `resource` performance entries as they are recorded in the browser's performance timeline. Use the `buffered` option to access entries from before the observer creation.


```js
const observer = new PerformanceObserver((list) => {
  list.getEntries().forEach((entry) => {
    entry.serverTiming.forEach((serverEntry) => {
      console.log(
        `${serverEntry.name} (${serverEntry.description}) duration: ${serverEntry.duration}`,
      );
      // Logs "cache (Cache Read) duration: 23.2"
    });
  });
});

["navigation", "resource"].forEach((type) =>
  observer.observe({ type, buffered: true }),
);
```


Example using `Performance.getEntriesByType()`, which only shows `navigation` and `resource` performance entries present in the browser's performance timeline at the time you call this method:


```js
for (const entryType of ["navigation", "resource"]) {
  for (const { name: url, serverTiming } of performance.getEntriesByType(
    entryType,
  )) {
    if (serverTiming) {
      for (const { name, description, duration } of serverTiming) {
        console.log(`${name} (${description}) duration: ${duration}`);
        // Logs "cache (Cache Read) duration: 23.2"
      }
    }
  }
}
```

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

| Specification |
| --- |
| Server Timing # dom-performanceservertiming-name |

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

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

See also
--------

* `PerformanceServerTiming`
* `Server-Timing`
PerformanceServerTiming: duration property
==========================================

The **`duration`** read-only property returns a double that contains the server-specified metric duration, or the value `0.0`.

Value
-----

A number.

Examples
--------

### Logging server timing entries

Server timing metrics require the server to send the `Server-Timing` header. For example:


```http
Server-Timing: cache;desc="Cache Read";dur=23.2
```


The `serverTiming` entries can live on `navigation` and `resource` entries.

Example using a `PerformanceObserver`, which notifies of new `navigation` and `resource` performance entries as they are recorded in the browser's performance timeline. Use the `buffered` option to access entries from before the observer creation.


```js
const observer = new PerformanceObserver((list) => {
  list.getEntries().forEach((entry) => {
    entry.serverTiming.forEach((serverEntry) => {
      console.log(
        `${serverEntry.name} (${serverEntry.description}) duration: ${serverEntry.duration}`,
      );
      // Logs "cache (Cache Read) duration: 23.2"
    });
  });
});

["navigation", "resource"].forEach((type) =>
  observer.observe({ type, buffered: true }),
);
```


Example using `Performance.getEntriesByType()`, which only shows `navigation` and `resource` performance entries present in the browser's performance timeline at the time you call this method:


```js
for (const entryType of ["navigation", "resource"]) {
  for (const { name: url, serverTiming } of performance.getEntriesByType(
    entryType,
  )) {
    if (serverTiming) {
      for (const { name, description, duration } of serverTiming) {
        console.log(`${name} (${description}) duration: ${duration}`);
        // Logs "cache (Cache Read) duration: 23.2"
      }
    }
  }
}
```

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

| Specification |
| --- |
| Server Timing # dom-performanceservertiming-duration |

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

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

See also
--------

* `PerformanceServerTiming`
* `Server-Timing`
PerformanceServerTiming: description property
=============================================

 The **`description`** read-only property returns a
 string value of the server-specified metric description, or an empty
 string.

Value
-----

A string.

Examples
--------

### Logging server timing entries

Server timing metrics require the server to send the `Server-Timing` header. For example:


```http
Server-Timing: cache;desc="Cache Read";dur=23.2
```


The `serverTiming` entries can live on `navigation` and `resource` entries.

Example using a `PerformanceObserver`, which notifies of new `navigation` and `resource` performance entries as they are recorded in the browser's performance timeline. Use the `buffered` option to access entries from before the observer creation.


```js
const observer = new PerformanceObserver((list) => {
  list.getEntries().forEach((entry) => {
    entry.serverTiming.forEach((serverEntry) => {
      console.log(
        `${serverEntry.name} (${serverEntry.description}) duration: ${serverEntry.duration}`,
      );
      // Logs "cache (Cache Read) duration: 23.2"
    });
  });
});

["navigation", "resource"].forEach((type) =>
  observer.observe({ type, buffered: true }),
);
```


Example using `Performance.getEntriesByType()`, which only shows `navigation` and `resource` performance entries present in the browser's performance timeline at the time you call this method:


```js
for (const entryType of ["navigation", "resource"]) {
  for (const { name: url, serverTiming } of performance.getEntriesByType(
    entryType,
  )) {
    if (serverTiming) {
      for (const { name, description, duration } of serverTiming) {
        console.log(`${name} (${description}) duration: ${duration}`);
        // Logs "cache (Cache Read) duration: 23.2"
      }
    }
  }
}
```

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

| Specification |
| --- |
| Server Timing # dom-performanceservertiming-description |

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

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

See also
--------

* `PerformanceServerTiming`
* `Server-Timing`
PerformanceServerTiming: toJSON() method
========================================

The **`toJSON()`** method of the `PerformanceServerTiming` interface is a serializer; it returns a JSON representation of the `PerformanceServerTiming` object.

Syntax
------


```js
toJSON()
```

### Parameters

None.

### Return value

A `JSON` object that is the serialization of the `PerformanceServerTiming` object.

Examples
--------

### Logging server timing entries

Server timing metrics require the server to send the `Server-Timing` header. For example:


```http
Server-Timing: cache;desc="Cache Read";dur=23.2
```


The `serverTiming` entries can live on `navigation` and `resource` entries.

Example using a `PerformanceObserver`, which notifies of new `navigation` and `resource` performance entries as they are recorded in the browser's performance timeline. Use the `buffered` option to access entries from before the observer creation.


```js
const observer = new PerformanceObserver((list) => {
  list.getEntries().forEach((entry) => {
    entry.serverTiming.forEach((serverEntry) => {
      console.log(serverEntry.toJSON());
    });
  });
});

["navigation", "resource"].forEach((type) =>
  observer.observe({ type, buffered: true }),
);
```


This would log a JSON object like so:


```json
{
  "name": "cache",
  "duration": 23.2,
  "description": "Cache Read"
}
```


To get a JSON string, you can use `JSON.stringify(serverEntry)` directly; it will call `toJSON()` automatically.

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

| Specification |
| --- |
| Server Timing # dom-performanceservertiming-tojson |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
HTMLOutputElement: labels property
==================================

 The **`HTMLOutputElement.labels`** read-only property returns a
 `NodeList` of the `<label>` elements associated with the
 `<output>` element.

Value
-----

 A `NodeList` containing the `<label>` elements associated
 with the `<output>` element.

Examples
--------

### HTML


```html
<label id="label1" for="test">Label 1</label>
<output id="test">Output</output>
<label id="label2" for="test">Label 2</label>
```

### JavaScript


```js
window.addEventListener("DOMContentLoaded", () => {
  const output = document.getElementById("test");
  for (const label of output.labels) {
    console.log(label.textContent); // "Label 1" and "Label 2"
  }
});
```

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

| Specification |
| --- |
| HTML Standard # dom-lfe-labels-dev |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
GPUInternalError: GPUInternalError() constructor
================================================

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

 The **`GPUInternalError()`** constructor creates a new
 `GPUInternalError` object instance.

Syntax
------


```js
new GPUInternalError(message)
```

### Parameters

`message`

A string providing a human-readable message that explains why the error occurred.

Examples
--------

A developer would not manually use the constructor to create a `GPUInternalError` object. The user agent uses this constructor to create an appropriate object when an internal error is surfaced by `GPUDevice.popErrorScope` or the `uncapturederror` event.

See the main `GPUInternalError` page for an example involving a `GPUInternalError` object instance.

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

| Specification |
| --- |
| WebGPU # dom-gpuinternalerror-gpuinternalerror |

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

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

See also
--------

* The WebGPU API
* WebGPU Error Handling best practices
HTMLMediaElement: buffered property
===================================

The **`buffered`** read-only property of `HTMLMediaElement` objects returns a new static normalized `TimeRanges` object that represents the ranges of the media resource, if any, that the user agent has buffered at the moment the `buffered` property is accessed.

Value
-----

A new static normalized TimeRanges object that represents the ranges of the media resource, if any, that the user agent has buffered at the moment the `buffered` property is accessed.

Examples
--------


```js
const obj = document.createElement("video");
console.log(obj.buffered); // TimeRanges { length: 0 }
```

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

| Specification |
| --- |
| HTML Standard # dom-media-buffered-dev |
| Media Source Extensions™ # htmlmediaelement-extensions |

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

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

See also
--------

* `HTMLMediaElement`: Interface used to define the `HTMLMediaElement.buffered` property