recursal/MDN huggingface dataset:
RTCDTMFToneChangeEvent
======================

The **`RTCDTMFToneChangeEvent`** interface represents events sent to indicate that DTMF tones have started or finished playing. This interface is used by the `tonechange` event.

Event

RTCDTMFToneChangeEventInstance properties
-------------------

*In addition to the properties of `Event`, this interface offers the following:*

`RTCDTMFToneChangeEvent.tone` Read only 

A string specifying the tone which has begun playing, or an empty string (`""`) if the previous tone has finished playing.

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

`RTCDTMFToneChangeEvent()`

Returns a new `RTCDTMFToneChangeEvent`. It takes two parameters, the first being a string representing the type of the event (always `"tonechange"`); the second a dictionary containing the initial state of the properties of the event.

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

*Supports the methods defined in `Event`. There are no additional methods.*

Examples
--------

This snippet is derived loosely from the full, working example you'll find in the section on When a tone finishes playing. It appends each tone to a display box as it's played, and, once all tones have been sent, re-enabled a previously-disabled "Send" button, allowing the next DMTF string to be entered.


```js
dtmfSender.addEventListener(
  "change",
  (event) => {
    if (event.tone !== "") {
      dialStringBox.innerText += event.tone;
    } else {
      sendDTMFButton.disabled = false;
    }
  },
  false,
);
```

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

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

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

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

See also
--------

* WebRTC
* Its usual target: `RTCDTMFSender`.
ErrorEvent
==========

The **`ErrorEvent`** interface represents events providing information related to errors in scripts or in files.

Event

ErrorEventInstance properties
-------------------

*Also inherits properties from its parent `Event`*.

`ErrorEvent.message` Read only 

A string containing a human-readable error message describing the problem. Lacking a `crossorigin` setting reduces error logging.

`ErrorEvent.filename` Read only 

A string containing the name of the script file in which the error occurred.

`ErrorEvent.lineno` Read only 

An `integer` containing the line number of the script file on which the error occurred.

`ErrorEvent.colno` Read only 

An `integer` containing the column number of the script file on which the error occurred.

`ErrorEvent.error` Read only 

A JavaScript `Object` that is concerned by the event.

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

`ErrorEvent()`

Creates an `ErrorEvent` event with the given parameters.

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

*Inherits methods from its parent `Event`*.

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

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

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

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

See also
--------

* Using web workers, most likely objects to raise such an event
KHR\_parallel\_shader\_compile extension
========================================

The **`KHR_parallel_shader_compile`** extension is part of the WebGL API and enables a non-blocking poll operation, so that compile/link status availability (`COMPLETION_STATUS_KHR`) can be queried without potentially incurring stalls. In other words you can check the status of your shaders compiling without blocking the runtime.

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

Constants
---------

`ext.COMPLETION_STATUS_KHR`

A GLenum.

Examples
--------

Enable the extension:


```js
const ext = gl.getExtension("KHR\_parallel\_shader\_compile");
```


In general, best practice with or without the extension is:


```js
// Assuming lists of `shaders` and `programs`:
for (const x of shaders) gl.compileShader(x); // Never check compile status unless subsequent linking fails.
for (const x of programs) gl.linkProgram(x);
```


With the extension, apps would be able to poll whether programs have linked without janking, but these are likely to take the same total wall time to link:


```js
// Generator yielding a progress ratio [0.0, 1.0].
// Without the extension, this will jank and only check one program per generation.
function\* linkingProgress(programs) {
  const ext = gl.getExtension("KHR\_parallel\_shader\_compile");
  let todo = programs.slice();
  while (todo.length) {
    if (ext) {
      todo = todo.filter(
        (x) => !gl.getProgramParameter(x, ext.COMPLETION\_STATUS\_KHR),
      );
    } else {
      const x = todo.pop();
      gl.getProgramParameter(x, gl.LINK\_STATUS);
    }
    if (!todo.length) return;
    yield 1.0 - todo.length / programs.length;
  }
}
```

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

| Specification |
| --- |
| WebGL KHR\_parallel\_shader\_compile Extension Specification  |

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

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

See also
--------

* `WebGLRenderingContext.getExtension()`
LinearAccelerationSensor
========================

The **`LinearAccelerationSensor`** interface of the Sensor APIs provides on each reading the acceleration applied to the device along all three axes, but without the contribution of gravity.

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

EventTarget

Sensor

Accelerometer

LinearAccelerationSensorConstructor
-----------

`LinearAccelerationSensor()`

Creates a new `LinearAccelerationSensor` object.

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

*Inherits properties from its ancestors, `Accelerometer`, `Sensor`, and `EventTarget`.*

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

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

Events
------

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

Example
-------

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


```js
let laSensor = new LinearAccelerationSensor({ frequency: 60 });

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

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

| Specification |
| --- |
| Accelerometer # linearaccelerationsensor-interface |

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

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

The **`FileReaderSync`** interface allows to read `File` or `Blob` objects synchronously. This interface is only available in workers as it enables synchronous I/O that could potentially block.

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

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

`FileReaderSync()`

Returns a new `FileReaderSync` object.

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

This interface does not have any properties.

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

`FileReaderSync.readAsArrayBuffer()`

This method converts a specified `Blob` or a `File` into an `ArrayBuffer` representing the input data as a binary string.

`FileReaderSync.readAsBinaryString()` 
Deprecated

This method converts a specified `Blob` or a `File` into a string representing the input data as a binary string. This method is deprecated, consider using `readAsArrayBuffer()` instead.

`FileReaderSync.readAsText()`

This method converts a specified `Blob` or a `File` into a string representing the input data as a text string. The optional **`encoding`** parameter indicates the encoding to be used (e.g., iso-8859-1 or UTF-8). If not present, the method will apply a detection algorithm for it.

`FileReaderSync.readAsDataURL()`

This method converts a specified `Blob` or a `File` into a string representing the input data as a data URL.

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

| Specification |
| --- |
| File API # FileReaderSync |

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

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

See also
--------

* `FileReader`
* `Blob`
* `File`
EXT\_blend\_minmax extension
============================

The **`EXT_blend_minmax`** extension is part of the WebGL API and extends blending capabilities by adding two new blend equations: the minimum or maximum color components of the source and destination colors.

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. The constants in WebGL2 are `gl.MIN` and `gl.MAX`.

Constants
---------

This extension adds two new constants, which can be used in `WebGLRenderingContext.blendEquation()` and `WebGLRenderingContext.blendEquationSeparate()`:

`ext.MIN_EXT`

Produces the minimum color components of the source and destination colors.

`ext.MAX_EXT`

Produces the maximum color components of the source and destination colors.

Examples
--------


```js
const ext = gl.getExtension("EXT\_blend\_minmax");

gl.blendEquation(ext.MIN\_EXT);
gl.blendEquation(ext.MAX\_EXT);

gl.blendEquationSeparate(ext.MIN\_EXT, ext.MAX\_EXT);
```

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

| Specification |
| --- |
| WebGL EXT\_blend\_minmax 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.blendEquation()`
* `WebGLRenderingContext.blendEquationSeparate()`
SVGElement
==========

All of the SVG DOM interfaces that correspond directly to elements in the SVG language derive from the `SVGElement` interface.

EventTarget

Node

Element

SVGElementInstance properties
-------------------

*Also inherits properties from the `Element` interface.*

`SVGElement.attributeStyleMap` Read only 

A `StylePropertyMap` representing the declarations of the element's `style` attribute.

`HTMLElement.dataset` Read only 

A `DOMStringMap` object which provides a list of key/value pairs of named data attributes which correspond to custom data attributes attached to the element. These can also be defined in SVG using attributes of the form `data-\*`, where `*` is the key name for the pair. This works just like HTML's `HTMLElement.dataset` property and HTML's `data-*` global attribute.

`SVGElement.className` 
Deprecated
 Read only 

An `SVGAnimatedString` that reflects the value of the `class` attribute on the given element, or the empty string if `class` is not present. This attribute is deprecated and may be removed in a future version of this specification. Authors are advised to use `Element.classList` instead.

`SVGElement.nonce`

Returns the cryptographic number used once that is used by Content Security Policy to determine whether a given fetch will be allowed to proceed.

`SVGElement.ownerSVGElement` Read only 

An `SVGSVGElement` referring to the nearest ancestor `<svg>` element. `null` if the given element is the outermost `<svg>` element.

`SVGElement.style`

A `CSSStyleDeclaration` representing the declarations of the element's `style` attribute.

`SVGElement.tabIndex`

The position of the element in the tabbing order.

`SVGElement.viewportElement` Read only 

The `SVGElement` which established the current viewport. Often the nearest ancestor `<svg>` element. `null` if the given element is the outermost `<svg>` element.

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

*This interface has no methods, but inherits methods from `Element`.*

Events
------

Listen to these events using `addEventListener()` or by assigning an event listener to the equivalent `on...` handler property.

`abort`

Fired when page loading is stopped before an SVG element has been allowed to load completely.

`error`

Fired when an SVG element does not load properly or when an error occurs during script execution.

`load`

Fires on an `SVGElement` when it is loaded in the browser.

`resize`

Fired when an SVG document is being resized.

`scroll`

Fired when an SVG document view is being shifted along the X and/or Y axes.

`unload`

Fired when the DOM implementation removes an SVG document from a window or frame.

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

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

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

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

See also
--------

* HTML `data-*` attribute
* SVG `data-\*` attribute
* Using custom data attributes in HTML
WindowControlsOverlay
=====================

**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 **`WindowControlsOverlay`** interface of the Window Controls Overlay API exposes information about the geometry
 of the title bar area in desktop Progressive Web Apps, and an event to know whenever it changes. This interface is accessible from `Navigator.windowControlsOverlay`.

EventTarget

WindowControlsOverlayInstance properties
-------------------

`WindowControlsOverlay.visible` Read only  
Experimental

A Boolean that indicates whether the window controls overlay is visible or not.

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

`WindowControlsOverlay.getTitlebarAreaRect()` 
Experimental

Returns the size and position of the title bar.

Events
------

Listen to these events using `EventTarget.addEventListener()` or by assigning an event listener to the relevant `oneventname` property of this interface.

`geometrychange` 
Experimental

Fired when the geometry of the title bar area changes.

Examples
--------


```js
if ("windowControlsOverlay" in navigator) {
  navigator.windowControlsOverlay.addEventListener(
    "geometrychange",
    (event) => {
      if (event.visible) {
        const rect = event.titlebarAreaRect;
        // Do something with the coordinates of the title bar area.
      }
    },
  );
}
```

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

| Specification |
| --- |
| Window Controls Overlay # windowcontrolsoverlay-interface |

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

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

The **`ProcessingInstruction`** interface represents a processing instruction; that is, a `Node` which embeds an instruction targeting a specific application but that can be ignored by any other applications which don't recognize the instruction.

**Warning:** `ProcessingInstruction` nodes are only supported in XML documents, not in HTML documents. In these, a process instruction will be considered as a comment and be represented as a `Comment` object in the tree.

A processing instruction may be different than the XML declaration.

**Note:** User-defined processing instructions cannot begin with "`xml`", as `xml`-prefixed processing-instruction target names are reserved by the XML specification for particular, standard uses (see, for example, `<?xml-stylesheet ?>`.

For example:


```html
<?xml version="1.0"?>
```


is a processing instruction whose `target` is `xml`.

EventTarget

Node

CharacterData

ProcessingInstructionInstance properties
-------------------

*This interface also inherits properties from its parent interfaces, `CharacterData`, `Node`, and `EventTarget`.*

`ProcessingInstruction.sheet` Read only 

Returns the associated `StyleSheet` object, if any; or `null` if none.

`ProcessingInstruction.target` Read only 

A name identifying the application to which the instruction is targeted.

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

*This interface doesn't have any specific method, but inherits methods from its parent interfaces, `CharacterData`, `Node`, and `EventTarget`.*

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

| Specification |
| --- |
| DOM Standard # interface-processinginstruction |

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

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

See also
--------

* document.createProcessingInstruction()
* The DOM API
ReadableStreamDefaultController
===============================

The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a `ReadableStream`'s state and internal queue. Default controllers are for streams that are not byte streams.

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

None. `ReadableStreamDefaultController` instances are created automatically during `ReadableStream` construction.

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

`ReadableStreamDefaultController.desiredSize` Read only 

Returns the desired size required to fill the stream's internal queue.

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

`ReadableStreamDefaultController.close()`

Closes the associated stream.

`ReadableStreamDefaultController.enqueue()`

Enqueues a given chunk in the associated stream.

`ReadableStreamDefaultController.error()`

Causes any future interactions with the associated stream to error.

Examples
--------

In the following simple example, a custom `ReadableStream` is created using a constructor (see our Simple random stream example for the full code). The `start()` function generates a random string of text every second and enqueues it into the stream. A `cancel()` function is also provided to stop the generation if `ReadableStream.cancel()` is called for any reason.

Note that a `ReadableStreamDefaultController` object is provided as the parameter of the `start()` and `pull()` functions.

When a button is pressed, the generation is stopped, the stream is closed using `ReadableStreamDefaultController.close()`, and another function is run, which reads the data back out of the stream.


```js
let interval;
const stream = new ReadableStream({
  start(controller) {
    interval = setInterval(() => {
      let string = randomChars();

      // Add the string to the stream
      controller.enqueue(string);

      // show it on the screen
      let listItem = document.createElement("li");
      listItem.textContent = string;
      list1.appendChild(listItem);
    }, 1000);

    button.addEventListener("click", () => {
      clearInterval(interval);
      fetchStream();
      controller.close();
    });
  },
  pull(controller) {
    // We don't really need a pull in this example
  },
  cancel() {
    // This is called if the reader cancels,
    // so we should stop generating strings
    clearInterval(interval);
  },
});
```

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

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

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

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

See also
--------

* Streams API concepts
* Using readable streams
* `ReadableStream`
* WHATWG Stream Visualizer, for a basic visualization of readable, writable, and transform streams.
* Web-streams-polyfill or sd-streams - polyfills
SVGTextPathElement
==================

The **`SVGTextPathElement`** interface corresponds to the `<textPath>` element.

EventTarget

Node

Element

SVGElement

SVGGraphicsElement

SVGTextContentElement

SVGTextPathElementConstants
---------

### Method types

| Name | Value | Description |
| --- | --- | --- |
| `TEXTPATH_METHODTYPE_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.
  |
| `TEXTPATH_METHODTYPE_ALIGN` | 1 | Corresponds to the value `align`. |
| `TEXTPATH_METHODTYPE_STRETCH` | 2 | Corresponds to the value `stretch`. |

### Spacing types

| Name | Value | Description |
| --- | --- | --- |
| `TEXTPATH_SPACINGTYPE_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.
  |
| `TEXTPATH_SPACINGTYPE_AUTO` | 1 | Corresponds to the value `auto`. |
| `TEXTPATH_SPACINGTYPE_EXACT` | 2 | Corresponds to the value `exact`. |

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

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

`SVGTextPathElement.href` Read only 

An `SVGAnimatedString` corresponding to the `href` or `xlink:href` 
Deprecated
 attribute of the given element.

`SVGTextPathElement.startOffset` Read only 

An `SVGAnimatedLength` corresponding to the X component of the `startOffset` attribute of the given element.

`SVGTextPathElement.method` Read only 

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

`SVGTextPathElement.spacing` Read only 

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

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

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

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

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

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

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

See also
--------

* `<textPath>`
SVGFEMergeElement
=================

The **`SVGFEMergeElement`** interface corresponds to the `<feMerge>` element.

EventTarget

Node

Element

SVGElement

SVGFEMergeElementInstance properties
-------------------

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

`SVGFEMergeElement.height` Read only 

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

`SVGFEMergeElement.result` Read only 

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

`SVGFEMergeElement.width` Read only 

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

`SVGFEMergeElement.x` Read only 

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

`SVGFEMergeElement.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 # InterfaceSVGFEMergeElement |

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

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

See also
--------

* `<feMerge>`