recursal/MDN huggingface dataset:
Attr
====

The **`Attr`** interface represents one of an element's attributes as an object. In most situations, you will directly retrieve the attribute value as a string (e.g., `Element.getAttribute()`), but certain functions (e.g., `Element.getAttributeNode()`) or means of iterating return `Attr` instances.

EventTarget

Node

Attr
The core idea of an object of type `Attr` is the association between a *name* and a *value*. An attribute may also be part of a *namespace* and, in this case, it also has a URI identifying the namespace, and a prefix that is an abbreviation for the namespace.

The name is deemed *local* when it ignores the eventual namespace prefix and deemed *qualified* when it includes the prefix of the namespace, if any, separated from the local name by a colon (`:`). We have three cases: an attribute outside of a namespace, an attribute inside a namespace without a prefix defined, an attribute inside a namespace with a prefix:

| Attribute | Namespace name | Namespace prefix | Attribute local name | Attribute qualified name |
| --- | --- | --- | --- | --- |
| `myAttr` | *none* | *none* | `myAttr` | `myAttr` |
| `myAttr` | `mynamespace` | *none* | `myAttr` | `myAttr` |
| `myAttr` | `mynamespace` | `myns` | `myAttr` | `myns:myAttr` |

**Note:** This interface represents only attributes present in the tree representation of the `Element`, being a SVG, an HTML or a MathML element. It doesn't represent the *property* of an interface associated with such element, such as `HTMLTableElement` for a `<table>` element. (See this article for more information about attributes and how they are *reflected* into properties.)

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

*This interface also inherits the properties of its parent interfaces, `Node` and `EventTarget`.*

`localName` Read only 

A string representing the local part of the qualified name of the attribute.

`name` Read only 

The attribute's *qualified name*. If the attribute is not in a namespace, it will be the same as `localName` property.

`namespaceURI` Read only 

A string representing the URI of the namespace of the attribute, or `null` if there is no namespace.

`ownerElement` Read only 

The `Element` the attribute belongs to.

`prefix` Read only 

A string representing the namespace prefix of the attribute, or `null` if a namespace without prefix or no namespace are specified.

`specified` Read only  
Deprecated

This property always returns `true`.

`value`

The attribute's value, a string that can be set and get using this property.

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

*This interface has no specific methods, but inherits the methods of its parent interfaces, `Node` and `EventTarget`.*

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

| Specification |
| --- |
| DOM Standard # interface-attr |

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

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

See also
--------

* Other nodes are `CDATASection`, `CharacterData`, `Comment`, `Document`, `Element`, `ProcessingInstruction`, and `Text`.
SVGTitleElement
===============

The **`SVGTitleElement`** interface corresponds to the `<title>` element.

EventTarget

Node

Element

SVGElement

SVGTitleElementInstance properties
-------------------

*This interface doesn't implement any specific properties, but inherits properties from its parent interface, `SVGElement`.*

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

*This interface doesn't implement any specific methods, but inherits methods from its parent interface, `SVGElement`.*

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

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

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

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

For historical reasons, `Window` objects have a `window.HTMLDocument` property whose value is the `Document` interface. So you can think of `HTMLDocument` as an alias for `Document`, and you can find documentation for `HTMLDocument` members under the documentation for the `Document` interface.

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

| Specification |
| --- |
| HTML Standard # htmldocument |

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

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

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

The **`IdentityCredential`** interface of the Federated Credential Management API (FedCM) represents a user identity credential arising from a successful federated sign-in.

A successful `navigator.credentials.get()` call that includes an `identity` option fulfills with an `IdentityCredential` instance.

Credential

IdentityCredentialInstance properties
-------------------

*Inherits properties from its ancestor, `Credential`.*

`IdentityCredential.token` 
Experimental

Returns the token used to validate the associated sign-in.

Examples
--------

Relying parties (RPs) can call `navigator.credentials.get()` with the `identity` option to make a request for users to sign in to the RP via an identity provider (IdP), using identity federation. A typical request would look like this:


```js
async function signIn() {
  const identityCredential = await navigator.credentials.get({
    identity: {
      providers: [
        {
          configURL: "https://accounts.idp.example/config.json",
          clientId: "\*\*\*\*\*\*\*\*",
          nonce: "\*\*\*\*\*\*",
        },
      ],
    },
  });
}
```


If successful, this call will fulfill with an `IdentityCredential` instance. From this, you could return the `IdentityCredential.token` value, for example:


```js
console.log(identityCredential.token);
```


Check out Federated Credential Management API (FedCM) for more details on how this works. This call will start off the sign-in flow described in FedCM sign-in flow.

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

| Specification |
| --- |
| Federated Credential Management API # browser-api-identity-credential-interface |

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

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

See also
--------

* Federated Credential Management API
ImageBitmap
===========

The **`ImageBitmap`** interface represents a bitmap image which can be drawn to a `<canvas>` without undue latency. It can be created from a variety of source objects using the `createImageBitmap()` factory method. `ImageBitmap` provides an asynchronous and resource efficient pathway to prepare textures for rendering in WebGL.

`ImageBitmap` is a transferable object.

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

`ImageBitmap.height` Read only 

An `unsigned long` representing the height, in CSS pixels, of the `ImageData`.

`ImageBitmap.width` Read only 

An `unsigned long` representing the width, in CSS pixels, of the `ImageData`.

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

`ImageBitmap.close()`

Disposes of all graphical resources associated with an `ImageBitmap`.

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

| Specification |
| --- |
| HTML Standard # imagebitmap |

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

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

See also
--------

* `createImageBitmap()`
* `CanvasRenderingContext2D.drawImage()`
* `WebGLRenderingContext.texImage2D()`
* `OffscreenCanvas.transferToImageBitmap()`
XREquirectLayer
===============

**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 **`XREquirectLayer`** interface of the WebXR Device API is a layer that maps equirectangular coded data onto the inside of a sphere.

`XREquirectLayer` requires the `layers` feature to be enabled for the `XRSession`. You can request it in `XRSystem.requestSession()`.

To create a new `XREquirectLayer`, call either:

* `XRWebGLBinding.createEquirectLayer()` for a WebGL opaque texture layer, or
* `XRMediaBinding.createEquirectLayer()` for an HTML `<video>` playback layer.

To present layers to the XR device, add them to the `layers` render state using `XRSession.updateRenderState()`.

EventTarget

XRLayer

XRCompositionLayer

XREquirectLayerInstance properties
-------------------

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

`XREquirectLayer.centralHorizontalAngle` 
Experimental

A number indicating the central horizontal angle in radians for the sphere.

`XREquirectLayer.lowerVerticalAngle` 
Experimental

A number indicating the lower vertical angle in radians for the sphere.

`XREquirectLayer.radius` 
Experimental

A number indicating the radius of the sphere.

`XREquirectLayer.space` 
Experimental

An `XRSpace` representing the layer's spatial relationship with the user's physical environment.

`XREquirectLayer.transform` 
Experimental

An `XRRigidTransform` representing the offset and orientation relative to `space`.

`XREquirectLayer.upperVerticalAngle` 
Experimental

A number indicating the upper vertical angle in radians for the sphere.

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

*Inherits methods from its parents, `XRCompositionLayer` and `EventTarget`*.

Events
------

`redraw` 
Experimental

Sent to the `XREquirectLayer` object when the underlying resources of the layer are lost or when the XR Compositor can no longer reproject the layer. If this event is sent, authors should redraw the content of the layer in the next XR animation frame.

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

| Specification |
| --- |
| WebXR Layers API Level 1 # xrequirectlayertype |

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

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

See also
--------

* `XRLayer`
* `EventTarget`
* `XRCompositionLayer`
* `XRCylinderLayer`
* `XRCubeLayer`
* `XRQuadLayer`
* `XRProjectionLayer`
WebGLVertexArrayObject
======================

The **`WebGLVertexArrayObject`** interface is part of the WebGL 2 API, represents vertex array objects (VAOs) pointing to vertex array data, and provides names for different sets of vertex data.

WebGLObject

WebGLVertexArrayObject
When working with `WebGLVertexArrayObject` objects, the following methods are useful:

* `WebGL2RenderingContext.createVertexArray()`
* `WebGL2RenderingContext.deleteVertexArray()`
* `WebGL2RenderingContext.isVertexArray()`
* `WebGL2RenderingContext.bindVertexArray()`

**Note:** The `OES_vertex_array_object` extension allows you to use vertex array objects in a WebGL 1 context.

Examples
--------


```js
const vao = gl.createVertexArray();
gl.bindVertexArray(vao);

// …

// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO

// …
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.6 |

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

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

See also
--------

* `OES_vertex_array_object`
CSSTransformValue
=================

The **`CSSTransformValue`** interface of the CSS\_Object\_Model#css\_typed\_object\_model represents `transform-list` values as used by the CSS `transform` property.

CSSStyleValue

CSSTransformValueInterfaces based on CSSTransformValue
-------------------------------------

Below is a list of interfaces based on the `CSSTransformValue` interface.

* `CSSTranslate`
* `CSSRotate`
* `CSSScale`
* `CSSSkew`
* `CSSSkewX`
* `CSSSkewY`
* `CSSPerspective`
* `CSSMatrixComponent`
Constructor
-----------

`CSSTransformValue()`

Creates a new `CSSTransformValue` object.

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

`CSSTransformValue.length` Read only 

Returns how many transform components are contained within the `CSSTransformValue`.

`CSSTransformValue.is2D` Read only 

Returns a boolean indicating whether the transform is 2D or 3D.

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

*Inherits methods from its ancestor `CSSStyleValue`.*

`CSSTransformValue.toMatrix()`

Returns a new `DOMMatrix` object.

`CSSUnparsedValue.entries()`

Returns an array of a given object's own enumerable property `[key, value]` pairs in the same order as that provided by a `for...in` loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).

`CSSUnparsedValue.forEach()`

Executes a provided function once for each element of the `CSSTransformValue` object.

`CSSUnparsedValue.keys()`

Returns a new *array iterator* object that contains the keys for each index in the `CSSTransformValue` object.

`CSSUnparsedValue.values()`

Returns a new *array iterator* object that contains the values for each index in the `CSSTransformValue` object.

Examples
--------

To Do.

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

| Specification |
| --- |
| CSS Typed OM Level 1 # transformvalue-objects |

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

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

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

The **`GPUComputePipeline`** interface of the WebGPU API represents a pipeline that controls the compute shader stage and can be used in a `GPUComputePassEncoder`.

A `GPUComputePipeline` object instance can be created using the `GPUDevice.createComputePipeline()` or `GPUDevice.createComputePipelineAsync()` methods.

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.

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

`getBindGroupLayout()` 
Experimental

Returns the pipeline's `GPUBindGroupLayout` object with the given index (i.e. included in the originating `GPUDevice.createComputePipeline()` or `GPUDevice.createComputePipelineAsync()` call's pipeline layout).

Examples
--------

**Note:** The WebGPU samples feature many more examples.

### Basic example

Our basic compute demo shows a process of:

* Creating a bind group layout with `GPUDevice.createBindGroupLayout()`.
* Feeding the `bindGroupLayout` into `GPUDevice.createPipelineLayout()` to create a `GPUPipelineLayout`.
* Using that value immediately in a `createComputePipeline()` call to create a `GPUComputePipeline`.


```js
// ...

const bindGroupLayout = device.createBindGroupLayout({
  entries: [
    {
      binding: 0,
      visibility: GPUShaderStage.COMPUTE,
      buffer: {
        type: "storage",
      },
    },
  ],
});

const computePipeline = device.createComputePipeline({
  layout: device.createPipelineLayout({
    bindGroupLayouts: [bindGroupLayout],
  }),
  compute: {
    module: shaderModule,
    entryPoint: "main",
  },
});

// ...
```

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

| Specification |
| --- |
| WebGPU # gpucomputepipeline |

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

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

See also
--------

* The WebGPU API
GPUShaderModule
===============

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

The **`GPUShaderModule`** interface of the WebGPU API represents an internal shader module object, a container for WGSL shader code that can be submitted to the GPU for execution by a pipeline.

A `GPUShaderModule` object instance is created using `GPUDevice.createShaderModule()`.

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.

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

`getCompilationInfo()` 
Experimental

Returns a `Promise` that fulfills with a `GPUCompilationInfo` object containing messages generated during the `GPUShaderModule`'s compilation.

Examples
--------

In our basic render demo, our shader module is created using the following code:


```js
const shaders = `
struct VertexOut {
 @builtin(position) position : vec4f,
 @location(0) color : vec4f
}

@vertex
fn vertex\_main(@location(0) position: vec4f,
 @location(1) color: vec4f) -> VertexOut
{
 var output : VertexOut;
 output.position = position;
 output.color = color;
 return output;
}

@fragment
fn fragment\_main(fragData: VertexOut) -> @location(0) vec4f
{
 return fragData.color;
}
`;

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.");
  }

  let device = await adapter.requestDevice();

  // ...
  // later on

  const shaderModule = device.createShaderModule({
    code: shaders,
  });

  // ...
}
```

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

| Specification |
| --- |
| WebGPU # gpushadermodule |

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

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

See also
--------

* The WebGPU API
SyncManager
===========

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

The **`SyncManager`** interface of the Background Synchronization API provides an interface for registering and listing sync registrations.

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

None.

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

`SyncManager.register()` 
Experimental

Create a new sync registration and return a `Promise`.

`SyncManager.getTags()` 
Experimental

Return a list of developer-defined identifiers for `SyncManager` registrations.

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

| Specification |
| --- |
| Web Background Synchronization # sync-manager-interface |

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

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

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

The **`StorageManager`** interface of the Storage API provides an interface for managing persistence permissions and estimating available storage. You can get a reference to this interface using either `navigator.storage` or `WorkerNavigator.storage`.

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

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

`StorageManager.estimate()`

Returns a `Promise` that resolves to an object containing usage and quota numbers for your origin.

`StorageManager.getDirectory()`

Used to obtain a reference to a `FileSystemDirectoryHandle` object allowing access to a directory and its contents, stored in the origin private file system. Returns a `Promise` that fulfills with a `FileSystemDirectoryHandle` object.

`StorageManager.persist()`

Returns a `Promise` that resolves to `true` if the user agent is able to persist your site's storage.

`StorageManager.persisted()`

Returns a `Promise` that resolves to `true` if persistence has already been granted for your site's storage.

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

| Specification |
| --- |
| Storage Standard # storagemanager |

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

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

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

The **`AuthenticatorAssertionResponse`** interface of the Web Authentication API contains a digital signature from the private key of a particular WebAuthn credential. The relying party's server can verify this signature to authenticate a user, for example when they sign in.

An `AuthenticatorAssertionResponse` object instance is available in the `response` property of a `PublicKeyCredential` object returned by a successful `navigator.credentials.get()` call.

This interface inherits from `AuthenticatorResponse`.

AuthenticatorResponse

AuthenticatorAssertionResponse

**Note:** This interface is restricted to top-level contexts. Use from within an `<iframe>` element will not have any effect.

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

*Also inherits properties from its parent, `AuthenticatorResponse`.*

`AuthenticatorAssertionResponse.authenticatorData` Read only 

An `ArrayBuffer` containing information from the authenticator such as the Relying Party ID Hash (rpIdHash), a signature counter, test of user presence and user verification flags, and any extensions processed by the authenticator.

`AuthenticatorResponse.clientDataJSON` Read only 

Contains the JSON-compatible serialization of the data passed from the browser to the authenticator in order to authenticate with this credential — i.e., when `CredentialsContainer.get()` is called with a `publicKey` option. This data contains some information from the options passed into the `get()` call, and some information controlled by the browser.

`AuthenticatorAssertionResponse.signature` Read only 

An assertion signature over `AuthenticatorAssertionResponse.authenticatorData` and `AuthenticatorResponse.clientDataJSON`. The assertion signature is created with the private key of the key pair that was created during the originating `navigator.credentials.create()` call and verified using the public key of that same key pair.

`AuthenticatorAssertionResponse.userHandle` Read only 

An `ArrayBuffer` containing an opaque user identifier, specified as `user.id` in the options passed to the originating `navigator.credentials.create()` call.

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

None.

Examples
--------

See User login using the WebAuthn API for a detailed example.

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

| Specification |
| --- |
| Web Authentication: An API for accessing Public Key Credentials - Level 3 # iface-authenticatorassertionresponse |

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

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

See also
--------

* `AuthenticatorAttestationResponse`: the interface for the type of response given when creating a new credential
* `AuthenticatorResponse`: the parent interface