recursal/MDN huggingface dataset:
GPUExternalTexture
==================

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

The **`GPUExternalTexture`** interface of the WebGPU API represents a wrapper object containing an `HTMLVideoElement` snapshot that can be used as a texture in GPU rendering operations.

A `GPUExternalTexture` object instance is created using `GPUDevice.importExternalTexture()`.

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

`label` 
Experimental

A string providing a label that can be used to identify the object, for example in `GPUError` messages or console warnings.

Examples
--------

In the WebGPU samples Video Uploading sample, a `GPUExternalTexture` object (created via a `GPUDevice.importExternalTexture()` call) is used as the value of a bind group entry `resource`, specified when creating a `GPUBindGroup` via a `GPUDevice.createBindGroup()` call:


```js
//...
const uniformBindGroup = device.createBindGroup({
  layout: pipeline.getBindGroupLayout(0),
  entries: [
    {
      binding: 1,
      resource: sampler,
    },
    {
      binding: 2,
      resource: device.importExternalTexture({
        source: video,
      }),
    },
  ],
});
//...
```

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

| Specification |
| --- |
| WebGPU # gpuexternaltexture |

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

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

See also
--------

* The WebGPU API
TextDecoder
===========

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

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

Constructor
-----------

`TextDecoder()`

Returns a newly constructed `TextDecoder` that will generate a code point stream with the decoding method specified in parameters.

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

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

`TextDecoder.encoding` Read only 

A string containing the name of the decoder, which is a string describing the method the `TextDecoder` will use.

`TextDecoder.fatal` Read only 

A `Boolean` indicating whether the error mode is fatal.

`TextDecoder.ignoreBOM` Read only 

A `Boolean` indicating whether the byte order mark is ignored.

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

*The `TextDecoder` interface doesn't inherit any methods*.

`TextDecoder.decode()`

Returns a string containing the text decoded with the method of the specific `TextDecoder` object.

Examples
--------

### Representing text with typed arrays

This example shows how to decode a Chinese/Japanese character 
 ![Chinese character meaning lucky](/en-US/docs/Web/API/TextDecoder/2019-05-21_191907.png), as represented by five different typed arrays: `Uint8Array`, `Int8Array`, `Uint16Array`, `Int16Array`, and `Int32Array`.


```js
let utf8decoder = new TextDecoder(); // default 'utf-8' or 'utf8'

let u8arr = new Uint8Array([240, 160, 174, 183]);
let i8arr = new Int8Array([-16, -96, -82, -73]);
let u16arr = new Uint16Array([41200, 47022]);
let i16arr = new Int16Array([-24336, -18514]);
let i32arr = new Int32Array([-1213292304]);

console.log(utf8decoder.decode(u8arr));
console.log(utf8decoder.decode(i8arr));
console.log(utf8decoder.decode(u16arr));
console.log(utf8decoder.decode(i16arr));
console.log(utf8decoder.decode(i32arr));
```

### Handling non-UTF8 text

In this example, we decode the Russian text "Привет, мир!", which means "Hello, world." In our `TextDecoder()` constructor, we specify the Windows-1251 character encoding, which is appropriate for Cyrillic script.


```js
const win1251decoder = new TextDecoder("windows-1251");
const bytes = new Uint8Array([
  207, 240, 232, 226, 229, 242, 44, 32, 236, 232, 240, 33,
]);
console.log(win1251decoder.decode(bytes)); // Привет, мир!
```

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

| Specification |
| --- |
| Encoding Standard # interface-textdecoder |

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

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

See also
--------

* The `TextEncoder` interface describing the inverse operation.
* A shim allowing to use this interface in browsers that do not support it.
* Node.js supports global export from v11.0.0
HTMLOListElement
================

The **`HTMLOListElement`** interface provides special properties (beyond those defined on the regular `HTMLElement` interface it also has available to it by inheritance) for manipulating ordered list elements.

EventTarget

Node

Element

HTMLElement

HTMLOListElementInstance properties
-------------------

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

`HTMLOListElement.reversed`

A boolean value reflecting the `reversed` and defining if the numbering is descending, that is its value is `true`, or ascending (`false`).

`HTMLOListElement.start`

A `long` value reflecting the `start` and defining the value of the first number of the first element of the list.

`HTMLOListElement.type`

A string value reflecting the `type` and defining the kind of marker to be used to display. It can have the following values:

* `'1'` meaning that decimal numbers are used: `1`, `2`, `3`, `4`, `5`, …
* `'a'` meaning that the lowercase latin alphabet is used: `a`, `b`, `c`, `d`, `e`, …
* `'A'` meaning that the uppercase latin alphabet is used: `A`, `B`, `C`, `D`, `E`, …
* `'i'` meaning that the lowercase latin numerals are used: `i`, `ii`, `iii`, `iv`, `v`, …
* `'I'` meaning that the uppercase latin numerals are used: `I`, `II`, `III`, `IV`, `V`, …

`HTMLOListElement.compact` 
Deprecated

A boolean value indicating that spacing between list items should be reduced. This property reflects the `compact` attribute only, it doesn't consider the `line-height` CSS property used for that behavior in modern pages.

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

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

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

| Specification |
| --- |
| HTML Standard # htmlolistelement |

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: `<ol>`.
SVGMissingGlyphElement
======================

**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 **`SVGMissingGlyphElement`** interface corresponds to the `<missing-glyph>` elements.

Object-oriented access to the attributes of the `<missing-glyph>` element via the SVG DOM is not possible.

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

*This interface has no properties but inherits properties from its parent, `SVGElement`.*

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

*This interface has no methods but inherits methods from its parent, `SVGElement`.*

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

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

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

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

See also
--------

* `<missing-glyph>`
USB
===

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
**Experimental:** **This is an experimental technology**  
Check the Browser compatibility table carefully before using this in production.

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

The **`USB`** interface of the WebUSB API provides attributes and methods for finding and connecting USB devices from a web page.

Use `navigator.usb` to get access to the `USB` object.

The USB interface inherits from `EventTarget`.

EventTarget

USBInstance properties
-------------------

None.

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

`USB.getDevices()` 
Experimental

Returns a `Promise` that resolves with an array of `USBDevice` objects for paired attached devices.

`USB.requestDevice()` 
Experimental

Returns a `Promise` that resolves with an instance of `USBDevice` if the specified device is found. Calling this function triggers the user agent's pairing flow.

Events
------

`connect` 
Experimental

Fired whenever a previously paired device is connected.

`disconnect` 
Experimental

Fired whenever a paired device is disconnected.

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

| Specification |
| --- |
| WebUSB API # usb |

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

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

The **`RTCCertificate`** interface of the WebRTC API provides an object representing a certificate that an `RTCPeerConnection` uses to authenticate.

`RTCCertificate` is a serializable object, so it can be cloned with `structuredClone()` or copied between Workers using `postMessage()`.

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

`RTCCertificate.expires` Read only 

Returns the expiration date of the certificate.

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

`RTCCertificate.getFingerprints()`

Returns an array of certificate fingerprints, calculated using the different algorithms supported by the browser.

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

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # dom-rtccertificate |

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

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

See also
--------

* `RTCPeerConnection.RTCPeerConnection()` argument `configuration.certificates`
* `RTCPeerConnection.generateCertificate()`
SourceBufferList
================

The **`SourceBufferList`** interface represents a simple container list for multiple `SourceBuffer` objects.

The source buffer list containing the `SourceBuffer`s appended to a particular `MediaSource` can be retrieved using the `MediaSource.sourceBuffers` property.

The individual source buffers can be accessed using the bracket notation `[]`.

EventTarget

SourceBufferListInstance properties
-------------------

`SourceBufferList.length` Read only 

Returns the number of `SourceBuffer` objects in the list.

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

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

Events
------

`addsourcebuffer`

Fired when a `SourceBuffer` is added to the list.

`removesourcebuffer`

Fired when a `SourceBuffer` is removed from the list.

Examples
--------

This example shows how to access the active source buffers of the `MediaSource` connected to an already playing `HTMLVideoElement`.


```js
// Video is an already playing video using a MediaSource srcObject
const video = document.querySelector("video");
const mediaSource = video.srcObject;
const sourceBufferList = mediaSource.activeSourceBuffers;
for (const sourceBuffer of sourceBufferList) {
  // Do something with each SourceBuffer, such as call abort()
  sourceBuffer.abort();
}
```

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

| Specification |
| --- |
| Media Source Extensions™ # sourcebufferlist |

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

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

See also
--------

* `MediaSource`
* `SourceBuffer`
SVGFontElement
==============

**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 **`SVGFontElement`** interface corresponds to the `<font>` elements.

Object-oriented access to the attributes of the `<font>` element via the SVG DOM is not possible.

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

*This interface has no properties but inherits properties from its parent, `SVGElement`.*

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

*This interface has no methods but inherits methods from its parent, `SVGElement`.*

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

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

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

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

See also
--------

* `<font>` SVG Element
MediaCapabilities
=================

The **`MediaCapabilities`** interface of the Media Capabilities API provides information about the decoding abilities of the device, system and browser. The API can be used to query the browser about the decoding abilities of the device based on codecs, profile, resolution, and bitrates. The information can be used to serve optimal media streams to the user and determine if playback should be smooth and power efficient.

The information is accessed through the **`mediaCapabilities`** property of the `Navigator` interface.

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

`MediaCapabilities.encodingInfo()`

When passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether encoding such media would be smooth and power efficient.

`MediaCapabilities.decodingInfo()`

When passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether decoding such media would be smooth and power efficient.

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

| Specification |
| --- |
| Media Capabilities # media-capabilities-interface |

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

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

See also
--------

* HTMLMediaElement's method canPlayType()
* MediaSource's method isTypeSupported()
* `Navigator` interface
WEBGL\_color\_buffer\_float extension
=====================================

The **`WEBGL_color_buffer_float`** extension is part of the WebGL API and adds the ability to render to 32-bit floating-point color buffers.

WebGL extensions are available using the `WebGLRenderingContext.getExtension()` method. For more information, see also Using Extensions in the WebGL tutorial.

**Note:** This extension is available to WebGL 1 contexts only. For WebGL 2, use the `EXT_color_buffer_float` extension.

The `OES_texture_float` extension implicitly enables this extension.

Constants
---------

`ext.RGBA32F_EXT`

RGBA 32-bit floating-point color-renderable format.

`ext.RGB32F_EXT` (
Deprecated
)

RGB 32-bit floating-point color-renderable format.

`ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT`

?

`ext.UNSIGNED_NORMALIZED_EXT`

?

Extended methods
----------------

This extension extends `WebGLRenderingContext.renderbufferStorage()`:

* The `internalformat` parameter now accepts `ext.RGBA32F_EXT` and `ext.RGB32F_EXT` (
Deprecated
).
Examples
--------


```js
const ext = gl.getExtension("WEBGL\_color\_buffer\_float");

gl.renderbufferStorage(gl.RENDERBUFFER, ext.RGBA32F\_EXT, 256, 256);
```

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

| Specification |
| --- |
| WebGL WEBGL\_color\_buffer\_float Extension Specification  |

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

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

See also
--------

* `WebGLRenderingContext.getExtension()`
* `WebGLRenderingContext.renderbufferStorage()`
* `OES_texture_float`
Gyroscope
=========

The **`Gyroscope`** interface of the Sensor APIs provides on each reading the angular velocity of the device along all three axes.

To use this sensor, the user must grant permission to the `'gyroscope'` device sensor through the Permissions API. In addition, this feature may be blocked by a Permissions Policy set on your server.

EventTarget

Sensor

GyroscopeConstructor
-----------

`Gyroscope()`

Creates a new `Gyroscope` object.

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

`Gyroscope.x` Read only 

Returns a double, containing the angular velocity of the device along the device's x axis.

`Gyroscope.y` Read only 

Returns a double, containing the angular velocity of the device along the device's y axis.

`Gyroscope.z` Read only 

Returns a double, containing the angular velocity of the device along the device's z axis.

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

*`Gyroscope` doesn't have own methods. However, it inherits methods from its parent interfaces, `Sensor` and `EventTarget`.*

Events
------

*`Gyroscope` doesn't have own events. However, it inherits events from its parent interface, `Sensor`.*

Example
-------

The gyroscope is typically read in the `reading` event callback. In the example below this occurs sixty times a second.


```js
let gyroscope = new Gyroscope({ frequency: 60 });

gyroscope.addEventListener("reading", (e) => {
  console.log(`Angular velocity along the X-axis ${gyroscope.x}`);
  console.log(`Angular velocity along the Y-axis ${gyroscope.y}`);
  console.log(`Angular velocity along the Z-axis ${gyroscope.z}`);
});
gyroscope.start();
```

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

| Specification |
| --- |
| Gyroscope # gyroscope-interface |

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

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

The **`DOMStringMap`** interface is used for the `HTMLElement.dataset` attribute, to represent data for custom attributes added to elements.

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

| Specification |
| --- |
| HTML Standard # embedding-custom-non-visible-data-with-the-data-\*-attributes:domstringmap-3 |

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

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

See also
--------

* `HTMLElement.dataset`
* Global attributes - `data-*`
InputDeviceCapabilities
=======================

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

The **`InputDeviceCapabilities`** interface of the Input Device Capabilities API provides information about the physical device or a group of related devices responsible for generating input events. Events caused by the same physical input device get the same instance of this object, but the converse isn't true. For example, two mice with the same capabilities in a system may appear as a single `InputDeviceCapabilities` instance.

In some instances, `InputDeviceCapabilities` represents the capabilities of logical devices rather than physical devices. This allows, for example, touchscreen keyboards and physical keyboards to be represented the same way when they produce the same input.

Constructors
------------

`InputDeviceCapabilities()` 
Experimental

Creates an `InputDeviceCapabilities` object.

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

`InputDeviceCapabilities.firesTouchEvents` Read only  
Experimental

A `Boolean` that indicates whether the device dispatches touch events.

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

None.

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

| Specification |
| --- |
| Input Device Capabilities # dom-inputdevicecapabilities |

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

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

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
**Secure context:** This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

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

The **`USBConnectionEvent`** interface of the WebUSB API is the event type passed to `USB` `connect` and `disconnect` events when the user agent detects that a new USB device has been connected or disconnected.

Event

USBConnectionEventConstructor
-----------

`USBConnectionEvent()` 
Experimental

Returns a `USBConnectionEvent` object.

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

`USBConnectionEvent.device` Read only  
Experimental

Returns a `USBDevice` object representing the current device.

Examples
--------

In the following example listening for connect and disconnect events is used to add and remove the devices from the user interface of an application.


```js
navigator.usb.addEventListener("connect", (event) => {
  // Add event.device to the UI.
});

navigator.usb.addEventListener("disconnect", (event) => {
  // Remove event.device from the UI.
});
```

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

| Specification |
| --- |
| WebUSB API # usbconnectionevent |

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

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

**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 **`MimeType`** interface provides contains information about a MIME type associated with a particular plugin. `Navigator.mimeTypes` returns an array of this object.

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

`MimeType.type` 
Deprecated

Returns the MIME type of the associated plugin.

`MimeType.description` 
Deprecated

Returns a description of the associated plugin or an empty string if there is none.

`MimeType.suffixes` 
Deprecated

A string containing valid file extensions for the data displayed by the plugin, or an empty string if an extension is not valid for the particular module. For example, a browser's content decryption module may appear in the plugin list but support more file extensions than can be anticipated. It might therefore return an empty string.

`MimeType.enabledPlugin` 
Deprecated

Returns an instance of `Plugin` containing information about the plugin itself.

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

| Specification |
| --- |
| HTML Standard # mimetype |

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

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