recursal/MDN huggingface dataset:
GPUTextureView
==============

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

The **`GPUTextureView`** interface of the WebGPU API represents a view into a subset of the texture resources defined by a particular `GPUTexture`.

A `GPUTextureView` object instance is created using the `GPUTexture.createView()` method.

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 Cubemap demo, you will see multiple examples of how `GPUTextureView`s (created by `GPUTexture.createView()` calls) are used, both as a `resource` in a `GPUDevice.createBindGroup()` call, and as a provided `view` in the `depthStencilAttachment` object of a `GPUCommandEncoder.beginRenderPass()` descriptor.


```js
const uniformBindGroup = device.createBindGroup({
  layout: pipeline.getBindGroupLayout(0),
  entries: [
    {
      binding: 0,
      resource: {
        buffer: uniformBuffer,
        offset: 0,
        size: uniformBufferSize,
      },
    },
    {
      binding: 1,
      resource: sampler,
    },
    {
      binding: 2,
      resource: cubemapTexture.createView({
        dimension: "cube",
      }),
    },
  ],
});

const renderPassDescriptor: GPURenderPassDescriptor = {
  colorAttachments: [
    {
      view: undefined, // Assigned later
      loadOp: "clear",
      storeOp: "store",
    },
  ],
  depthStencilAttachment: {
    view: depthTexture.createView(),
    depthClearValue: 1.0,
    depthLoadOp: "clear",
    depthStoreOp: "store",
  },
};

// ...

const commandEncoder = device.createCommandEncoder();
const passEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);

// ...
```

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

| Specification |
| --- |
| WebGPU # gputextureview |

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

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

See also
--------

* The WebGPU API
WebTransportReceiveStream
=========================

**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 `WebTransportReceiveStream` interface of the WebTransport API is a `ReadableStream` that can be used to read from an incoming unidirectional or bidirectional `WebTransport` stream.

The stream is a readable byte stream of `Uint8Array`, and can be consumed using either a BYOB reader (`ReadableStreamBYOBReader`) or the default reader (`ReadableStreamDefaultReader`).

 Objects of this type are not constructed directly.
 Instead they are obtained using the `WebTransport.incomingUnidirectionalStream` property.

`WebTransportReceiveStream` is a transferable object.

ReadableStream

WebTransportReceiveStream

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

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

*Inherits properties from its parent interface, `ReadableStream`.*

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

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

`WebTransportReceiveStream.getStats()` 
Experimental

Returns a `Promise` that resolves with statistics related to this stream.

Examples
--------

See `WebTransport.incomingUnidirectionalStreams` for an example of how to get a `ReadableStream` of `WebTransportReceiveStream` objects.

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

| Specification |
| --- |
| WebTransport # webtransportreceivestream |

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

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

See also
--------

* Using WebTransport
* Streams API
* WebTransport over HTTP/3
BluetoothRemoteGATTServer
=========================

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

 The **`BluetoothRemoteGATTServer`** interface of the Web Bluetooth API represents a GATT
 Server on a remote device.

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

`BluetoothRemoteGATTServer.connected` Read only  
Experimental

 A boolean value that returns true while this script execution environment is
 connected to `this.device`. It can be false while the user agent is
 physically connected.


`BluetoothRemoteGATTServer.device` Read only  
Experimental

A reference to the `BluetoothDevice` running the server.

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

`BluetoothRemoteGATTServer.connect()` 
Experimental

Causes the script execution environment to connect to `this.device`.

`BluetoothRemoteGATTServer.disconnect()` 
Experimental

Causes the script execution environment to disconnect from `this.device`.

`BluetoothRemoteGATTServer.getPrimaryService()` 
Experimental

 Returns a promise to the primary `BluetoothRemoteGATTService` offered by the
 Bluetooth device for a specified `BluetoothServiceUUID`.


`BluetoothRemoteGATTServer.getPrimaryServices()` 
Experimental

 Returns a promise to a list of primary `BluetoothRemoteGATTService` objects
 offered by the Bluetooth device for a specified `BluetoothServiceUUID`.


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

| Specification |
| --- |
| Web Bluetooth # bluetoothgattremoteserver-interface |

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

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

The File and Directory Entries API interface **`FileSystem`** is used to represent a file system. These objects can be obtained from the `filesystem` property on any file system entry. Some browsers offer additional APIs to create and manage file systems, such as Chrome's `requestFileSystem()` method.

This interface will not grant you access to the users' filesystem. Instead, you will have a "virtual drive" within the browser sandbox if you want to gain access to the users' file system, you need to invoke the user, for example by installing a Chrome extension. The relevant Chrome API can be found here.

Basic concepts
--------------

There are two ways to get access to a `FileSystem` object:

1. You can directly ask for one representing a sandboxed file system created just for your web app directly by calling `window.requestFileSystem()`. If that call is successful, it executes a callback handler, which receives as a parameter a `FileSystem` object describing the file system.
2. You can get it from a file system entry object, through its `filesystem` property.
Instance properties
-------------------

`FileSystem.name` Read only 

A string representing the file system's name. This name is unique among the entire list of exposed file systems.

`FileSystem.root` Read only 

A `FileSystemDirectoryEntry` object which represents the file system's root directory. Through this object, you can gain access to all files and directories in the file system.

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

| Specification |
| --- |
| File and Directory Entries API # api-domfilesystem |

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

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

See also
--------

* File and Directory Entries API
* Introduction to the File and Directory Entries API
* `FileSystemEntry`, `FileSystemFileEntry`, and `FileSystemDirectoryEntry`
CloseEvent
==========

A `CloseEvent` is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the `WebSocket` object's `onclose` attribute.

Event

CloseEventConstructor
-----------

`CloseEvent()`

Creates a new `CloseEvent`.

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

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

`CloseEvent.code` Read only 

Returns an `unsigned short` containing the close code sent by the server.

`CloseEvent.reason` Read only 

Returns a string indicating the reason the server closed the connection. This is specific to the particular server and sub-protocol.

`CloseEvent.wasClean` Read only 

Returns a boolean value that Indicates whether or not the connection was cleanly closed.

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

*This interface also inherits methods from its parent, `Event`.*

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

| Specification |
| --- |
| WebSockets Standard # the-closeevent-interface |

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

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

See also
--------

* `WebSocket`
AnimationPlaybackEvent
======================

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

Newly availableSince September 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 AnimationPlaybackEvent interface of the Web Animations API represents animation events.

As animations play, they report changes to their `playState` through animation events.

Event

AnimationPlaybackEventConstructor
-----------

`AnimationPlaybackEvent()`

Constructs a new `AnimationPlaybackEvent` object instance.

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

`AnimationPlaybackEvent.currentTime` Read only 

The current time of the animation that generated the event.

`AnimationPlaybackEvent.timelineTime` Read only 

The time value of the timeline of the animation that generated the event.

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

| Specification |
| --- |
| Web Animations # the-animationplaybackevent-interface |

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

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

See also
--------

* Web Animations API
* `Animation.playState`
Comment
=======

The **`Comment`** interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view.

Comments are represented in HTML and XML as content between '`<!--`' and '`-->`'. In XML, like inside SVG or MathML markup, the character sequence '`--`' cannot be used within a comment.

EventTarget

Node

CharacterData

CommentInstance properties
-------------------

*This interface has no specific property, but inherits those of its parent, `CharacterData`, and indirectly those of `Node`.*

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

`Comment()`

Returns a new `Comment` object with the parameter as its textual content. If not present, its default value is the empty string, `''`.

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

*This interface has no specific method, but inherits those of its parent, `CharacterData`, and indirectly those of `Node`.*

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

| Specification |
| --- |
| DOM Standard # interface-comment |

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

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

See also
--------

* The DOM API
AesCbcParams
============

The **`AesCbcParams`** dictionary of the Web Crypto API represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.encrypt()`, `SubtleCrypto.decrypt()`, `SubtleCrypto.wrapKey()`, or `SubtleCrypto.unwrapKey()`, when using the AES-CBC algorithm.

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

`name`

A string. This should be set to `AES-CBC`.

`iv`

An `ArrayBuffer`, a `TypedArray`, or a `DataView`. The initialization vector. Must be 16 bytes, unpredictable, and preferably cryptographically random. However, it need not be secret (for example, it may be transmitted unencrypted along with the ciphertext).

Examples
--------

See the examples for `SubtleCrypto.encrypt()` and `SubtleCrypto.decrypt()`.

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

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

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

Browsers that support the "AES-CBC" algorithm for the `SubtleCrypto.encrypt()`, `SubtleCrypto.decrypt()`, `SubtleCrypto.wrapKey()`, or `SubtleCrypto.unwrapKey()` methods will support this type.

See also
--------

* CBC mode is defined in section 6.2 of the NIST SP800-38A standard.
* `SubtleCrypto.encrypt()`.
* `SubtleCrypto.decrypt()`.
* `SubtleCrypto.wrapKey()`.
* `SubtleCrypto.unwrapKey()`.
RTCIceParameters
================

The **`RTCIceParameters`** dictionary specifies the username fragment and password assigned to an ICE session.

During ICE negotiation, each peer's username fragment and password are recorded in an `RTCIceParameters` object, which can be obtained from the `RTCIceTransport` by calling its `getLocalParameters()` or `getRemoteParameters()` method, depending on which end interests you.

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

`usernameFragment`

A string specifying the value of the ICE session's username fragment field, `ufrag`.

`password`

A string specifying the session's password string.

Usage notes
-----------

The username fragment and password uniquely identify the remote peer for the duration of the ICE session, and are used to both ensure security and to avoid crosstalk across multiple ongoing ICE sessions. See `RTCIceCandidate.usernameFragment` for further information.

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

#### No specification found

No specification data found for `api.RTCIceParameters`.  
Check for problems with this page or contribute a missing `spec_url` to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

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

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

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

The **`GPU`** interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a `GPUAdapter` from which you can request devices, configure features and limits, and more.

The `GPU` object for the current context is accessed via the `Navigator.gpu` or `WorkerNavigator.gpu` properties.

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

`wgslLanguageFeatures` 
Experimental
 Read only 

A `WGSLLanguageFeatures` object that reports the WGSL language extensions supported by the WebGPU implementation.

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

`requestAdapter()` 
Experimental

Returns a `Promise` that fulfills with a `GPUAdapter` object instance. From this you can request a `GPUDevice`, which is the primary interface for using WebGPU functionality.

`getPreferredCanvasFormat()` 
Experimental

Returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system.

Examples
--------

### Requesting an adapter and a device


```js
async function init() {
  if (!navigator.gpu) {
    throw Error("WebGPU not supported.");
  }

  const adapter = await navigator.gpu.requestAdapter();
  if (!adapter) {
    throw Error("Couldn't request WebGPU adapter.");
  }

  const device = await adapter.requestDevice();

  //...
}
```

### Configuring a GPUCanvasContext with the optimal texture format


```js
const canvas = document.querySelector("#gpuCanvas");
const context = canvas.getContext("webgpu");

context.configure({
  device: device,
  format: navigator.gpu.getPreferredCanvasFormat(),
  alphaMode: "premultiplied",
});
```

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

| Specification |
| --- |
| WebGPU # gpu-interface |

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

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

See also
--------

* The WebGPU API
Fetch API
=========

The Fetch API provides an interface for fetching resources (including across the network). It is a more powerful and flexible replacement for `XMLHttpRequest`.

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

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

The Fetch API uses `Request` and `Response` objects (and other things involved with network requests), as well as related concepts such as CORS and the HTTP Origin header semantics.

For making a request and fetching a resource, use the `fetch()` method. It is a global method in both `Window` and `Worker` contexts. This makes it available in pretty much any context you might want to fetch resources in.

The `fetch()` method takes one mandatory argument, the path to the resource you want to fetch. It returns a `Promise` that resolves to the `Response` to that request — as soon as the server responds with headers — **even if the server response is an HTTP error status**. You can also optionally pass in an `init` options object as the second argument (see `Request`).

Once a `Response` is retrieved, there are a number of methods available to define what the body content is and how it should be handled.

You can create a request and response directly using the `Request()` and `Response()` constructors, but it's uncommon to do this directly. Instead, these are more likely to be created as results of other API actions (for example, `FetchEvent.respondWith()` from service workers).

Find out more about using the Fetch API features in Using Fetch, and study concepts in Fetch basic concepts.

Fetch Interfaces
----------------

`fetch()`

The `fetch()` method used to fetch a resource.

`Headers`

Represents response/request headers, allowing you to query them and take different actions depending on the results.

`Request`

Represents a resource request.

`Response`

Represents the response to a request.

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

| Specification |
| --- |
| Fetch Standard # fetch-method |

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

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

See also
--------

* Using Fetch
* Service Worker API
* HTTP access control (CORS)
* HTTP
* Fetch polyfill
* Fetch basic concepts
XRAnchorSet
===========

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

The **`XRAnchorSet`** interface exposes a collection of anchors. Its instances are returned by `XRFrame.trackedAnchors` and are `Set`-like objects.

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

See `Set` for details.

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

See `Set` for details.

Examples
--------

### Handling anchor tracking loss


```js
const trackedAnchors = frame.trackedAnchors;

for (const anchor of previousFrameAnchors) {
  if (!trackedAnchors.has(anchor)) {
    // Handle anchor tracking loss
  }
}
```

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

| Specification |
| --- |
| WebXR Anchors Module # xranchorset |

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

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

See also
--------

* `XRAnchor`
* `XRFrame.trackedAnchors`
USBInTransferResult
===================

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 `USBInTransferResult` interface of the WebUSB API provides the result from a call to the `transferIn()` and `controlTransferIn()` methods of the `USBDevice` interface. It represents the result from requesting a transfer of data from the USB device to the USB host.

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

`USBInTransferResult()` 
Experimental

Creates a new `USBInTransferResult` object with the provided `status` and `data` fields.

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

`USBInTransferResult.data` Read only  
Experimental

Returns a `DataView` object containing the data received from the USB device, if any.

`USBInTransferResult.status` Read only  
Experimental

Returns the status of the transfer request, one of:

* `"ok"` - The transfer was successful.
* `"stall"` - The device indicated an error by generating a stall condition on the endpoint. A stall on the control endpoint does not need to be cleared. A stall on a bulk or interrupt endpoint must be cleared by calling `clearHalt()` before `transferIn()` can be called again.
* `"babble"` - The device responded with more data than was expected.

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

| Specification |
| --- |
| WebUSB API # usbintransferresult |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
OES\_element\_index\_uint extension
===================================

The **`OES_element_index_uint`** extension is part of the WebGL API and adds support for `gl.UNSIGNED_INT` types to `WebGLRenderingContext.drawElements()`.

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

**Note:** This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default.

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

This extension extends `WebGLRenderingContext.drawElements()`:

* The `type` parameter now accepts `gl.UNSIGNED_INT`.
Examples
--------


```js
const ext = gl.getExtension("OES\_element\_index\_uint");

gl.drawElements(gl.POINTS, 8, gl.UNSIGNED\_INT, 0);
```

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

| Specification |
| --- |
| WebGL OES\_element\_index\_uint Khronos Ratified Extension Specification  |

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

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

See also
--------

* `WebGLRenderingContext.getExtension()`
* `WebGLRenderingContext.drawElements()`
HTMLMenuElement
===============

 The **`HTMLMenuElement`** interface provides additional properties (beyond those inherited from the `HTMLElement` interface) for manipulating a `<menu>` element.
 `<menu>` is a semantic alternative to the `<ul>` element.

EventTarget

Node

Element

HTMLElement

HTMLMenuElementInstance properties
-------------------

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

`HTMLMenuElement.compact` 
Deprecated

A boolean determining if the menu displays compactly.

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

*Inherits methods from its parent, `HTMLElement`, and its ancestors.*

*`HTMLMenuElement` doesn't implement specific methods.*

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

| Specification |
| --- |
| HTML Standard # htmlmenuelement |

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

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

See also
--------

* `HTMLMenuItemElement`
caches global property
======================

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

 The global **`caches`** read-only property returns the `CacheStorage` object associated with the current context.
 This object enables functionality such as storing assets for offline use, and generating custom responses to requests.

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

Value
-----

A `CacheStorage` object.

Examples
--------

The following example shows how you'd use a cache in a service worker context to store assets offline.


```js
this.addEventListener("install", (event) => {
  event.waitUntil(
    caches
      .open("v1")
      .then((cache) =>
        cache.addAll([
          "/",
          "/index.html",
          "/style.css",
          "/app.js",
          "/image-list.js",
          "/star-wars-logo.jpg",
          "/gallery/",
          "/gallery/bountyHunters.jpg",
          "/gallery/myLittleVader.jpg",
          "/gallery/snowTroopers.jpg",
        ]),
      ),
  );
});
```

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

| Specification |
| --- |
| Service Workers # self-caches |

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

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

See also
--------

* Service Workers
* Web Workers
* `CacheStorage`
* `Cache`