recursal/MDN huggingface dataset:
TextDecoder: fatal property
===========================

The **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.

 If the property is `true`, then a decoder will throw a `TypeError` if it encounters malformed data while decoding.
 If `false`, the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).
 The value of the property is set in the `TextDecoder()` constructor.

Value
-----

 A boolean which will be `true` if the error mode is set to `fatal`.
 Otherwise, it will be `false`, indicating that the error mode is `replacement`.

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

| Specification |
| --- |
| Encoding Standard # ref-for-dom-textdecoder-fatal① |

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

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

The **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.

 The decoding method is defined in the current `TextDecoder` object.
 This includes the expected encoding of the data, and how decoding errors are handled.

Syntax
------


```js
decode()
decode(buffer)
decode(buffer, options)
```

### Parameters

`buffer` Optional

An `ArrayBuffer`, a `TypedArray`, or a `DataView` object containing the encoded text to decode.

`options` Optional

An object with the property:

`stream`

 A boolean flag indicating whether additional data will follow in subsequent calls to `decode()`.
 Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.
 It defaults to `false`.



### Exceptions

`TypeError`

Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.

### Return value

A string.

Examples
--------

This example encodes and decodes the euro symbol, €.

### HTML


```html
<p>Encoded value: <span id="encoded-value"></span></p>
<p>Decoded value: <span id="decoded-value"></span></p>
```

### JavaScript


```js
const encoder = new TextEncoder();
const array = encoder.encode("€"); // Uint8Array(3) [226, 130, 172]
document.getElementById("encoded-value").textContent = array;

const decoder = new TextDecoder();
const str = decoder.decode(array); // String "€"
document.getElementById("decoded-value").textContent = str;
```

### Result

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

| Specification |
| --- |
| Encoding Standard # ref-for-dom-textdecoder-decode① |

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

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

See also
--------

* The `TextDecoder` interface it belongs to.
MediaStreamTrackAudioSourceNode: MediaStreamTrackAudioSourceNode() constructor
==============================================================================

The Web Audio API's **`MediaStreamTrackAudioSourceNode()`** constructor creates and returns a new `MediaStreamTrackAudioSourceNode` object whose audio is taken from the `MediaStreamTrack` specified in the given options object.

Another way to create a `MediaStreamTrackAudioSourceNode` is to call the `AudioContext.createMediaStreamTrackSource()` method, specifying the `MediaStreamTrack` from which you want to obtain audio.

Syntax
------


```js
new MediaStreamTrackAudioSourceNode(context, options)
```

### Parameters

`context`

An `AudioContext` representing the audio context you want the node to be associated with.

`options`

An object defining the properties you want the `MediaStreamTrackAudioSourceNode` to have:

`mediaStreamTrack`

The `MediaStreamTrack` from which to take audio data for this node's output.


### Return value

A new `MediaStreamTrackAudioSourceNode` object representing the audio node whose media is obtained from the specified media track.

### Exceptions

`NotSupportedError` `DOMException`

Thrown if the specified `context` is not an `AudioContext`.

`InvalidStateError` `DOMException`

Thrown if the specified `MediaStreamTrack` isn't an audio track (that is, its `kind` property isn't `audio`.

Example
-------

This example uses `getUserMedia()` to obtain access to the user's camera, then creates a new `MediaStreamAudioSourceNode` from the first audio track provided by the device.


```js
const audioCtx = new AudioContext();

if (navigator.mediaDevices.getUserMedia) {
  navigator.mediaDevices
    .getUserMedia({
      audio: true,
      video: false,
    })
    .then((stream) => {
      const options = {
        mediaStreamTrack: stream.getAudioTracks()[0],
      };

      const source = new MediaStreamTrackAudioSourceNode(audioCtx, options);
      source.connect(audioCtx.destination);
    })
    .catch((err) => {
      console.error(`The following gUM error occurred: ${err}`);
    });
} else {
  console.log("new getUserMedia not supported on your browser!");
}
```

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

| Specification |
| --- |
| Web Audio API # dom-mediastreamtrackaudiosourcenode-mediastreamtrackaudiosourcenode |

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

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

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

 The **`name`** read-only property of
 the `PasswordCredential` interface returns a string
 containing a human-readable public name for display in a credential chooser.

Value
-----

A string containing a name.

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

| Specification |
| --- |
| Credential Management Level 1 # dom-credentialuserdata-name |

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

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

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

 The **`PasswordCredential()`**
 constructor creates a new `PasswordCredential` object. In
 supporting browsers, an instance of this class may be passed the `credential`
 from the `init` object for global `fetch()`.

Syntax
------


```js
new PasswordCredential(passwordCredentialData)
new PasswordCredential(htmlFormElement)
```

### Parameters

Either of the following:

`passwordCredentialData`

An object with the following properties:

`iconURL` Optional

The URL of a user's avatar image.

`id`

The ID of the user signing in.

`name` Optional

The name of the user signing in.

`password`

The password of the user signing in.


`htmlFormElement`

 A reference to an `HTMLFormElement` with appropriate input fields. The
 form should, at the very least, contain an id and password. It could also require a
 CSRF token.


Examples
--------

 This example shows how to set up an `HTMLFormElement` to capture data
 which we'll use to create a `PasswordCredential` object.

Starting with the form element.


```html
<form id="form" method="post">
  <label for="id">Username:</label>
  <input type="text" name="id" autocomplete="username" />
  <label for="password">Password:</label>
  <input type="password" name="password" autocomplete="current-password" />
  <input type="hidden" name="csrf\_token" value="\*\*\*\*\*" />
</form>
```


 Then, a reference to this form element, using it to create
 a `PasswordCredential` object, and storing it in the browser's password
 system.


```js
const form = document.querySelector("#form");
const creds = new PasswordCredential(form);
// Store the credentials.
navigator.credentials.store(creds).then((creds) => {
  // Do something with the credentials if you need to.
});
```

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

| Specification |
| --- |
| Credential Management Level 1 # dom-passwordcredential-passwordcredential |

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

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

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

 The **`password`** read-only property
 of the `PasswordCredential` interface returns a string
 containing the password of the credential.

Value
-----

A string containing a password.

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

| Specification |
| --- |
| Credential Management Level 1 # dom-passwordcredential-password |

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

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

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

 The **`iconURL`** read-only property
 of the `PasswordCredential` interface returns a string
 containing a URL pointing to an image for an icon. This image is intended for display
 in a credential chooser. The URL must be accessible without authentication.

Value
-----

A string containing a URL.

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

| Specification |
| --- |
| Credential Management Level 1 # dom-credentialuserdata-iconurl |

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

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

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

The **`BluetoothRemoteGATTCharacteristic.writeValueWithResponse()`** method sets a `BluetoothRemoteGATTCharacteristic` object's `value` property to the bytes contained in a given `ArrayBuffer`, calls `WriteCharacteristicValue`(*this*=`this`, *value=value*, *response*=`"required"`), and returns the resulting `Promise`.

Syntax
------


```js
writeValueWithResponse(value)
```

### Parameters

`value`

An `ArrayBuffer`.

### Return value

A `Promise`.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-writevaluewithresponse |

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

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

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

 The **`BluetoothRemoteGATTCharacteristic.getDescriptors()`** method
 returns a `Promise` that resolves to an `Array` of all
 `BluetoothRemoteGATTDescriptor` objects for a given descriptor UUID.

Syntax
------


```js
getDescriptors(bluetoothDescriptorUUID)
```

### Parameters

None.

### Return value

 A `Promise` that resolves to an `Array`
 of `BluetoothRemoteGATTDescriptor` objects.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-getdescriptors |

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

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

**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.

Use `BluetoothRemoteGATTCharacteristic.writeValueWithResponse()` and `BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse()` instead.

The **`BluetoothRemoteGATTCharacteristic.writeValue()`** method sets a `BluetoothRemoteGATTCharacteristic` object's `value` property to the bytes contained in a given `ArrayBuffer`, calls `WriteCharacteristicValue`(*this*=`this`, *value=value*, *response*=`"optional"`), and returns the resulting `Promise`.

Syntax
------


```js
writeValue(value)
```

### Parameters

`value`

An `ArrayBuffer`.

### Return value

A `Promise`.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-writevalue |

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

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

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

 The **`BluetoothRemoteGATTCharacteristic.uuid`** read-only
 property returns a string containing the UUID of the characteristic, for
 example `'00002a37-0000-1000-8000-00805f9b34fb'` for the Heart Rate
 Measurement characteristic.

Value
-----

A string.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-uuid |

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

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

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

The **`BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse()`** method sets a `BluetoothRemoteGATTCharacteristic` object's `value` property to the bytes contained in a given `ArrayBuffer`, calls `WriteCharacteristicValue`(*this*=`this`, *value=value*, *response*=`"never"`), and returns the resulting `Promise`.

Syntax
------


```js
writeValueWithoutResponse(value)
```

### Parameters

`value`

An `ArrayBuffer`.

### Return value

A `Promise`.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-writevaluewithoutresponse |

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

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

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

 The **`BluetoothRemoteGATTCharacteristic.properties`**
 read-only property returns a `BluetoothCharacteristicProperties` instance
 containing the properties of this characteristic.

Value
-----

The properties of this characteristic.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-properties |

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

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

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

 The **`BluetoothRemoteGATTCharacteristic.readValue()`** method
 returns a `Promise` that resolves to a `DataView` holding a
 duplicate of the `value` property if it is available and supported. Otherwise
 it throws an error.

Syntax
------


```js
readValue()
```

### Parameters

None.

### Return value

A `Promise` that resolves to an `DataView`.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-readvalue |

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

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

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

 The **`BluetoothRemoteGATTCharacteristic.service`** read-only
 property returns the `BluetoothRemoteGATTService` this characteristic belongs to.

Value
-----

An instance `BluetoothRemoteGATTService`.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-service |

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

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

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

 The **`BluetoothRemoteGATTCharacteristic.getDescriptor()`** method
 returns a `Promise` that resolves to the
 first `BluetoothRemoteGATTDescriptor` for a given descriptor UUID.

Syntax
------


```js
getDescriptor(bluetoothDescriptorUUID)
```

### Parameters

None.

### Return value

 A `Promise` that resolves to the
 first `BluetoothRemoteGATTDescriptor`.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-getdescriptor |

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

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

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

 The **`BluetoothRemoteGATTCharacteristic.stopNotifications()`** method
 returns a `Promise` to the BluetoothRemoteGATTCharacteristic instance when
 there is no longer an active notification on it.

Syntax
------


```js
stopNotifications()
```

### Parameters

None.

### Return value

A `Promise`.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-stopnotifications |

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

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

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

 The **`BluetoothRemoteGATTCharacteristic.startNotifications()`** method
 returns a `Promise` to the BluetoothRemoteGATTCharacteristic instance when
 there is an active notification on it.

Syntax
------


```js
startNotifications()
```

### Parameters

None.

### Return value

A `Promise` to the BluetoothRemoteGATTCharacteristic instance.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-startnotifications |

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

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

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

 The **`BluetoothRemoteGATTCharacteristic.value`** read-only
 property returns currently cached characteristic value. This value gets updated when the
 value of the characteristic is read or updated via a notification or indication.

Value
-----

The currently cached characteristic value.

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothremotegattcharacteristic-value |

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

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

Limited availability
--------------------

This feature is not Baseline because it does not work in some of the most widely-used browsers.

* Learn more
* See full compatibility
* Report feedback
The **`byteLength`** read-only property of the `EncodedVideoChunk` interface returns the length in bytes of the encoded video data.

Value
-----

An integer.

Examples
--------

In the following example the `byteLength` is printed to the console.


```js
const init = {
  type: "key",
  data: videoBuffer,
  timestamp: 23000000,
  duration: 2000000,
};
chunk = EncodedVideoChunk(init);

console.log(chunk.byteLength); //352800
```

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

| Specification |
| --- |
| WebCodecs # dom-encodedvideochunk-bytelength |

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

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

Limited availability
--------------------

This feature is not Baseline because it does not work in some of the most widely-used browsers.

* Learn more
* See full compatibility
* Report feedback
The **`type`** read-only property of the `EncodedVideoChunk` interface returns a value indicating whether the video chunk is a key chunk, which does not rely on other frames for decoding.

Value
-----

A string, one of:

`"key"`

The data is a key chunk.

`"delta"`

The data is not a key chunk.

Examples
--------

In the following example the `type` is printed to the console.


```js
const init = {
  type: "key",
  data: videoBuffer,
  timestamp: 23000000,
  duration: 2000000,
};
chunk = EncodedVideoChunk(init);

console.log(chunk.type); //"key"
```

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

| Specification |
| --- |
| WebCodecs # dom-encodedvideochunk-type |

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

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

Limited availability
--------------------

This feature is not Baseline because it does not work in some of the most widely-used browsers.

* Learn more
* See full compatibility
* Report feedback
The **`EncodedVideoChunk()`** constructor creates a new `EncodedVideoChunk` object representing a chunk of encoded video.

Syntax
------


```js
new EncodedVideoChunk(options)
```

### Parameters

`options`

An object containing the following members:

`type`

Indicates if the chunk is a key chunk that does not rely on other frames for encoding. One of:

`"key"`

The data is a key chunk.

`"delta"`

The data is not a key chunk.


`timestamp`

An integer representing the timestamp of the video in microseconds.

`duration`

An integer representing the length of the video in microseconds.

`data`

An `ArrayBuffer`, a `TypedArray`, or a `DataView` containing the video data.

`transfer`

An array of `ArrayBuffer`s that `EncodedVideoChunk` will detach and take ownership of. If the array contains the `ArrayBuffer` backing `data`, `EncodedVideoChunk` will use that buffer directly instead of copying from it.


Examples
--------

In the following example a new `EncodedVideoChunk` is created.


```js
const init = {
  type: "key",
  data: videoBuffer,
  timestamp: 23000000,
  duration: 2000000,
  transfer: [videoBuffer],
};
chunk = new EncodedVideoChunk(init);
```

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

| Specification |
| --- |
| WebCodecs # dom-encodedvideochunk-encodedvideochunk |

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

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