recursal/MDN huggingface dataset:
PluginArray
===========

**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 `PluginArray` interface is used to store a list of `Plugin` objects describing the available plugins; it's returned by the `navigator.plugins` property. The `PluginArray` is not a JavaScript array, but has the `length` property and supports accessing individual items using bracket notation (`plugins[2]`), as well as via `item(index)` and `namedItem("name")` methods.

**Note:** Own properties of `PluginArray` objects are no longer enumerable in the latest browser versions.

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

`PluginArray.length` Read only  
Deprecated

The number of plugins in the array.

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

`PluginArray.item` 
Deprecated

Returns the `Plugin` at the specified index into the array.

`PluginArray.namedItem` 
Deprecated

Returns the `Plugin` with the specified name.

`PluginArray.refresh` 
Deprecated

Refreshes all plugins on the current page, optionally reloading documents.

Examples
--------

The following example function returns the version of the Shockwave Flash plugin.


```js
const pluginsLength = navigator.plugins.length;

document.body.innerHTML =
  `${pluginsLength} Plugin(s)<br>` +
  `<table id="pluginTable"><thead>` +
  `<tr><th>Name</th><th>Filename</th><th>description</th><th>version</th></tr>` +
  `</thead><tbody></tbody></table>`;

const table = document.getElementById("pluginTable");

for (let i = 0; i < pluginsLength; i++) {
  let newRow = table.insertRow();
  newRow.insertCell().textContent = navigator.plugins[i].name;
  newRow.insertCell().textContent = navigator.plugins[i].filename;
  newRow.insertCell().textContent = navigator.plugins[i].description;
  newRow.insertCell().textContent = navigator.plugins[i].version ?? "";
}
```


The following example displays information about the installed plugin(s).


```js
const pluginsLength = navigator.plugins.length;

document.write(
  `${pluginsLength.toString()} Plugin(s)<br>` +
    `Name | Filename | description<br>`,
);

for (let i = 0; i < pluginsLength; i++) {
  document.write(
    `${navigator.plugins[i].name} | ${navigator.plugins[i].filename} | ${navigator.plugins[i].description} | ${navigator.plugins[i].version}<br>`,
  );
}
```

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

| Specification |
| --- |
| HTML Standard # pluginarray |

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

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

In addition to listing each plugin as a pseudo-array by zero-indexed numeric properties, Firefox provides properties that are the plugin name directly on the PluginArray object.
CSS Properties and Values API
=============================

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 **CSS Properties and Values API** — part of the CSS Houdini umbrella of APIs — allows developers to explicitly define their `CSS custom properties`, allowing for property type checking, default values, and properties that do or do not inherit their value.

Interfaces
----------

`CSS.registerProperty`

Defines how a browser should parse `CSS custom properties`. Access this interface through `CSS.registerProperty` in JavaScript.

`@property`

Defines how a browser should parse `CSS custom properties`. Access this interface through `@property` at-rule in CSS.

Examples
--------

The following will register a `CSS custom property` named `--my-prop` using `CSS.registerProperty` in JavaScript. `--my-prop` will use the CSS color syntax, it will have a default value of `#c0ffee`, and it will not inherit its value:


```js
window.CSS.registerProperty({
  name: "--my-color",
  syntax: "<color>",
  inherits: false,
  initialValue: "#c0ffee",
});
```


The same registration can take place in CSS using the `@property` at-rule:


```css
@property --my-color {
  syntax: "<color>";
  inherits: false;
  initial-value: #c0ffee;
}
```

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

| Specification |
| --- |
| CSS Properties and Values API Level 1 # the-css-property-rule-interface |
| CSS Properties and Values API Level 1 # the-registerproperty-function |

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

### api.CSSPropertyRule

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

### api.CSS.registerProperty\_static

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

See also
--------

* Using the CSS properties and values API
* CSS Painting API
* CSS Typed Object Model
* Houdini APIs
XRJointSpace
============

The **`XRJointSpace`** interface is an `XRSpace` and represents the position and orientation of an `XRHand` joint.

EventTarget

XRSpace

XRJointSpaceInstance properties
-------------------

`XRJointSpace.jointName` Read only 

The name of the joint that is tracked. See `XRHand` for possible hand joint names.

Examples
--------

### Using `XRJointSpace` objects

You can use an `XRJointSpace` object and an `XRReferenceSpace` to get an `XRJointPose` by calling `XRFrame.getJointPose()`.


```js
navigator.xr
  .requestSession({ optionalFeatures: ["hand-tracking"] })
  .then(/\*\* … \*/);

function renderFrame(session, frame) {
  // …

  for (const inputSource of session.inputSources) {
    if (inputSource.hand) {
      const indexFingerTipJoint = inputSource.hand.get("index-finger-tip"); // XRJointSpace
      indexFingerTipJoint.jointName; // "index-finger-tip"
      frame.getJointPose(indexFingerTipJoint, referenceSpace); // XRJointPose
    }
  }
}
```

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

| Specification |
| --- |
| WebXR Hand Input Module - Level 1 # xrhand-interface |

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

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

See also
--------

* `XRHand`
* `XRReferenceSpace`
* `XRJointPose`
* `XRFrame.getJointPose()`
GPUInternalError
================

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

The **`GPUInternalError`** interface of the WebGPU API describes an application error indicating that an operation did not pass the WebGPU API's validation constraints.

It represents one of the types of errors surfaced by `GPUDevice.popErrorScope` and the `uncapturederror` event.

Internal errors occur when something happens in the WebGPU implementation that wasn't caught by validation and wasn't clearly identifiable as an out-of-memory error. It generally means that an operation your code performed hit a system limit in a way that was difficult to express with WebGPU's supported limits. The same operation might succeed on a different device. These can only be raised by pipeline creation, usually if the shader is too complex for the device.

GPUError

GPUInternalErrorConstructor
-----------

`GPUInternalError()` 
Experimental

Creates a new `GPUInternalError` object instance.

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

The `message` property is inherited from its parent, `GPUError`:

`message` 
Experimental
 Read only 

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

Examples
--------

The following example uses an error scope to capture a suspected validation error, logging it to the console.


```js
device.pushErrorScope("internal");

const module = device.createShaderModule({
  code: shader, // REALLY complex shader
});

device.popErrorScope().then((error) => {
  if (error) {
    // error is a GPUInternalError object instance
    module = null;
    console.error(`An error occurred while creating shader: ${error.message}`);
  }
});
```

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

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

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

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

See also
--------

* The WebGPU API
* WebGPU Error Handling best practices
XRWebGLBinding
==============

**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 **`XRWebGLBinding`** interface is used to create layers that have a GPU backend.

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

`XRWebGLBinding()` 
Experimental

Creates a new `XRWebGLBinding` object for the specified XR session and WebGL rendering context.

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

`XRWebGLBinding.nativeProjectionScaleFactor` Read only  
Experimental

The `scaleFactor` that was passed in during the construction of the projection layer. The native buffer size is scaled by this number.

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

`XRWebGLBinding.createCubeLayer()` 
Experimental

Returns an `XRCubeLayer` object, which is a layer that renders directly from a cubemap, and projects it onto the inside faces of a cube.

`XRWebGLBinding.createCylinderLayer()` 
Experimental

Returns an `XRCylinderLayer` object which is a layer that takes up a curved rectangular space in the virtual environment.

`XRWebGLBinding.createEquirectLayer()` 
Experimental

Returns an `XREquirectLayer` object which is a layer that maps equirectangular coded data onto the inside of a sphere.

`XRWebGLBinding.createProjectionLayer()` 
Experimental

Returns an `XRProjectionLayer` object which is a layer that fills the entire view of the observer and is refreshed close to the device's native frame rate.

`XRWebGLBinding.createQuadLayer()` 
Experimental

Returns an `XRQuadLayer` object which is a two-dimensional object positioned and oriented in 3D space.

`XRWebGLBinding.getDepthInformation()` 
Experimental

Returns an `XRWebGLDepthInformation` object containing WebGL depth information.

`XRWebGLBinding.getReflectionCubeMap()` 
Experimental

Returns a `WebGLTexture` object containing a reflection cube map texture.

`XRWebGLBinding.getSubImage()` 
Experimental

Returns an `XRWebGLSubImage` object representing the WebGL texture to render.

`XRWebGLBinding.getViewSubImage()` 
Experimental

Returns an `XRWebGLSubImage` object representing the WebGL texture to render for an `XRView`.

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

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

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

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

See also
--------

* `XRWebGLLayer`
* `WebGLRenderingContext` and `WebGL2RenderingContext`
TransformStreamDefaultController
================================

The **`TransformStreamDefaultController`** interface of the Streams API provides methods to manipulate the associated `ReadableStream` and `WritableStream`.

When constructing a `TransformStream`, the `TransformStreamDefaultController` is created. It therefore has no constructor. The way to get an instance of `TransformStreamDefaultController` is via the callback methods of `TransformStream()`.

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

`TransformStreamDefaultController.desiredSize` Read only 

Returns the desired size to fill the readable side of the stream's internal queue.

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

`TransformStreamDefaultController.enqueue()`

Enqueues a chunk (single piece of data) in the readable side of the stream.

`TransformStreamDefaultController.error()`

Errors both the readable and writable side of the transform stream.

`TransformStreamDefaultController.terminate()`

Closes the readable side and errors the writable side of the stream.

Examples
--------

In the following example, a transform stream passes through all chunks it receives as `Uint8Array` values, using the `error()` and `enqueue()` methods.


```js
const transformContent = {
  start() {}, // required.
  async transform(chunk, controller) {
    chunk = await chunk;
    switch (typeof chunk) {
      case "object":
        // just say the stream is done I guess
        if (chunk === null) {
          controller.terminate();
        } else if (ArrayBuffer.isView(chunk)) {
          controller.enqueue(
            new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength),
          );
        } else if (
          Array.isArray(chunk) &&
          chunk.every((value) => typeof value === "number")
        ) {
          controller.enqueue(new Uint8Array(chunk));
        } else if (
          typeof chunk.valueOf === "function" &&
          chunk.valueOf() !== chunk
        ) {
          this.transform(chunk.valueOf(), controller); // hack
        } else if ("toJSON" in chunk) {
          this.transform(JSON.stringify(chunk), controller);
        }
        break;
      case "symbol":
        controller.error("Cannot send a symbol as a chunk part");
        break;
      case "undefined":
        controller.error("Cannot send undefined as a chunk part");
        break;
      default:
        controller.enqueue(this.textencoder.encode(String(chunk)));
        break;
    }
  },
  flush() {
    /\* do any destructor work here \*/
  },
};

class AnyToU8Stream extends TransformStream {
  constructor() {
    super({ ...transformContent, textencoder: new TextEncoder() });
  }
}
```

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

| Specification |
| --- |
| Streams Standard # ts-default-controller-class |

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

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

The **`CSSTransition`** interface of the Web Animations API represents an `Animation` object used for a CSS Transition.

EventTarget

Animation

CSSTransitionInstance properties
-------------------

*This interface inherits properties from its parent, `Animation`.*

`CSSTransition.transitionProperty` Read only 

Returns the transition CSS property name as a string.

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

*This interface inherits methods from its parent, `Animation`.*

No specific methods.

Examples
--------

### Inspecting the returned CSSTransition

The transition in the following example changes the width of the box on hover. Calling `Element.getAnimations()` returns an array of all `Animation` objects. In our case this returns a `CSSTransition` object, representing the animation created.


```css
.box {
  background-color: #165baa;
  color: #fff;
  width: 100px;
  height: 100px;
  transition: width 4s;
}

.box:hover {
  width: 200px;
}
```



```js
const item = document.querySelector(".box");
item.addEventListener("transitionrun", () => {
  let animations = document.querySelector(".box").getAnimations();
  console.log(animations[0]);
});
```

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

| Specification |
| --- |
| CSS Transitions Level 2 # the-CSSTransition-interface |

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

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

The **`HashChangeEvent`** interface represents events that fire when the fragment identifier of the URL has changed.

The fragment identifier is the part of the URL that follows (and includes) the `#` symbol.

Event

HashChangeEventConstructor
-----------

`HashChangeEvent()`

Creates a new `HashChangeEvent` object.

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

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

`HashChangeEvent.newURL` Read only 

The new URL to which the window is navigating.

`HashChangeEvent.oldURL` Read only 

The previous URL from which the window was navigated.

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

*This interface has no methods of its own, but inherits the methods of its parent, `Event`.*

Examples
--------

### Basic example


```js
function locationHashChanged() {
  if (location.hash === "#somecoolfeature") {
    somecoolfeature();
  }
}

window.addEventListener("hashchange", locationHashChanged);
```

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

| Specification |
| --- |
| HTML Standard # the-hashchangeevent-interface |

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

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

Related events
--------------

* `hashchange`
* `popstate`
SVGUnitTypes
============

The **`SVGUnitTypes`** interface defines a commonly used set of constants used for reflecting `gradientUnits`, `patternContentUnits` and other similar attributes.

Constants
---------

`SVG_UNIT_TYPE_UNKNOWN` (0)

The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.

`SVG_UNIT_TYPE_USERSPACEONUSE` (1)

Corresponds to the value `userSpaceOnUse`.

`SVG_UNIT_TYPE_OBJECTBOUNDINGBOX` (2)

Corresponds to the value `objectBoundingBox`.

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

*This interface doesn't implement any specific properties.*

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

*This interface doesn't implement any specific methods.*

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

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

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

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

The **`SVGLineElement`** interface provides access to the properties of `<line>` elements, as well as methods to manipulate them.

EventTarget

Node

Element

SVGElement

SVGGraphicsElement

SVGGeometryElement

SVGLineElementInstance properties
-------------------

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

`SVGLineElement.x1` Read only 

Returns an `SVGAnimatedLength` that corresponds to attribute `x1` on the given `<line>` element.

`SVGLineElement.y1` Read only 

Returns an `SVGAnimatedLength` that corresponds to attribute `y1` on the given `<line>` element.

`SVGLineElement.x2` Read only 

Returns an `SVGAnimatedLength` that corresponds to attribute `x2` on the given `<line>` element.

`SVGLineElement.y2` Read only 

Returns an `SVGAnimatedLength` that corresponds to attribute `y2` on the given `<line>` element.

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

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

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

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

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

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

See also
--------

* `<line>` SVG Element
WritableStreamDefaultController
===============================

The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a `WritableStream`'s state. When constructing a `WritableStream`, the underlying sink is given a corresponding `WritableStreamDefaultController` instance to manipulate.

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

None. `WritableStreamDefaultController` instances are created automatically during `WritableStream` construction.

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

`WritableStreamDefaultController.signal` Read only 

Returns the `AbortSignal` associated with the controller.

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

`WritableStreamDefaultController.error()`

Causes any future interactions with the associated stream to error.

Examples
--------


```js
const writableStream = new WritableStream({
  start(controller) {
    // do stuff with controller

    // error stream if necessary
    controller.error("My stream is broken");
  },
  write(chunk, controller) {
    // ...
  },
  close(controller) {
    // ...
  },
  abort(err) {
    // ...
  },
});
```

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

| Specification |
| --- |
| Streams Standard # ws-default-controller-class |

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

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

The **`SVGFEMorphologyElement`** interface corresponds to the `<feMorphology>` element.

EventTarget

Node

Element

SVGElement

SVGFEMorphologyElementConstants
---------

| Name | Value | Description |
| --- | --- | --- |
| `SVG_MORPHOLOGY_OPERATOR_UNKNOWN` | 0 | 
 The type is not one of predefined types. It is invalid to attempt to
 define a new value of this type or to attempt to switch an existing
 value to this type.
  |
| `SVG_MORPHOLOGY_OPERATOR_ERODE` | 1 | Corresponds to the `erode` value. |
| `SVG_MORPHOLOGY_OPERATOR_DILATE` | 2 | Corresponds to `dilate` value. |

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

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

`SVGFEMorphologyElement.height` Read only 

An `SVGAnimatedLength` corresponding to the `height` attribute of the given element.

`SVGFEMorphologyElement.in1` Read only 

An `SVGAnimatedString` corresponding to the `in` attribute of the given element.

`SVGFEMorphologyElement.operator` Read only 

An `SVGAnimatedEnumeration` corresponding to the `operator` attribute of the given element. It takes one of the `SVG_MORPHOLOGY_OPERATOR_*` constants defined on this interface.

`SVGFEMorphologyElement.radiusX` Read only 

An `SVGAnimatedNumber` corresponding to the X component of the `radius` attribute of the given element.

`SVGFEMorphologyElement.radiusY` Read only 

An `SVGAnimatedNumber` corresponding to the Y component of the `radius` attribute of the given element.

`SVGFEMorphologyElement.result` Read only 

An `SVGAnimatedString` corresponding to the `result` attribute of the given element.

`SVGFEMorphologyElement.width` Read only 

An `SVGAnimatedLength` corresponding to the `width` attribute of the given element.

`SVGFEMorphologyElement.x` Read only 

An `SVGAnimatedLength` corresponding to the `x` attribute of the given element.

`SVGFEMorphologyElement.y` Read only 

An `SVGAnimatedLength` corresponding to the `y` attribute of the given element.

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

*This interface does not provide any specific methods, but implements those of its parent, `SVGElement`.*

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

| Specification |
| --- |
| Filter Effects Module Level 1 # InterfaceSVGFEMorphologyElement |

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

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

See also
--------

* `<feMorphology>`