recursal/MDN huggingface dataset:
HighlightRegistry
=================

 The **`HighlightRegistry`** interface of the CSS Custom Highlight API is used to register `Highlight` objects to be styled using the API.
 It is accessed via `CSS.highlights`.

A `HighlightRegistry` instance is a `Map`-like object, in which each key is the name string for a custom highlight, and the corresponding value is the associated `Highlight` object.

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

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

`HighlightRegistry.size` Read only 

Returns the number of `Highlight` objects currently registered.

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

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

`HighlightRegistry.clear()`

Remove all `Highlight` objects from the registry.

`HighlightRegistry.delete()`

Remove the named `Highlight` object from the registry.

`HighlightRegistry.entries()`

Returns a new iterator object that contains each `Highlight` object in the registry, in insertion order.

`HighlightRegistry.forEach()`

Calls the given callback once for each `Highlight` object in the registry, in insertion order.

`HighlightRegistry.get()`

Gets the named `Highlight` object from the registry.

`HighlightRegistry.has()`

Returns a boolean asserting whether a `Highlight` object is present the registry or not.

`HighlightRegistry.keys()`

An alias for `HighlightRegistry.values()`.

`HighlightRegistry.set()`

Adds the given `Highlight` object to the registry with the given name, or updates the named `Highlight` object, if it already exists in the registry.

`HighlightRegistry.values()`

Returns a new iterator object that yields the `Highlight` objects in the registry, in insertion order.

Examples
--------

### Registering a highlight

The following example demonstrates how to create ranges, instantiate a new `Highlight` object for them, and register the highlight using the `HighlightRegistry`, to style it on the page:

#### HTML


```html
<p id="foo">CSS Custom Highlight API</p>
```


#### CSS


```css
::highlight(my-custom-highlight) {
  background-color: peachpuff;
}
```


#### JavaScript


```js
const text = document.getElementById("foo").firstChild;

if (!CSS.highlights) {
  text.textContent =
    "The CSS Custom Highlight API is not supported in this browser!";
}

// Create a couple of ranges.
const range1 = new Range();
range1.setStart(text, 0);
range1.setEnd(text, 3);

const range2 = new Range();
range2.setStart(text, 21);
range2.setEnd(text, 24);

// Create a custom highlight for these ranges.
const highlight = new Highlight(range1, range2);

// Register the ranges in the HighlightRegistry.
CSS.highlights.set("my-custom-highlight", highlight);
```


#### Result

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

| Specification |
| --- |
| CSS Custom Highlight API Module Level 1 # highlight-registry |

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

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

See also
--------

* The CSS Custom Highlight API
* CSS Custom Highlight API: The Future of Highlighting Text Ranges on the Web
EXT\_float\_blend extension
===========================

The WebGL API's `EXT_float_blend` extension allows blending and draw buffers with 32-bit floating-point components.

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

**Note:** This extension is available to both, WebGL1 and WebGL2 contexts. However, to use it, you need to enable the use of 32-bit floating-point draw buffers by enabling the extension `WEBGL_color_buffer_float` (for WebGL1) or `EXT_color_buffer_float` (for WebGL2). Doing so automatically enables `EXT_float_blend` as well, if and only if `EXT_float_blend` is also supported. Support for `EXT_color_buffer_float` does not imply support for `EXT_float_blend`.

With this extension enabled, calling `drawArrays()` or `drawElements()` with blending enabled and a draw buffer with 32-bit floating-point components will no longer result in an `INVALID_OPERATION` error.

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

On devices that support the `EXT_float_blend` extension, it is automatically, implicitly, enabled when any one or more of `EXT_color_buffer_float`, `OES_texture_float`, or `WEBGL_color_buffer_float` are enabled. This ensures that content written before `EXT_float_blend` was exposed by WebGL will function as expected.

Examples
--------


```js
const gl = canvas.getContext("webgl2");

// enable necessary extensions
gl.getExtension("EXT\_color\_buffer\_float");
gl.getExtension("EXT\_float\_blend");

const tex = gl.createTexture();
gl.bindTexture(gl.TEXTURE\_2D, tex);

// use floating point format
gl.texImage2D(gl.TEXTURE\_2D, 0, gl.RGBA32F, 1, 1, 0, gl.RGBA, gl.FLOAT, null);

const fb = gl.createFramebuffer();
gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
gl.framebufferTexture2D(
  gl.FRAMEBUFFER,
  gl.COLOR\_ATTACHMENT0,
  gl.TEXTURE\_2D,
  tex,
  0,
);

// enable blending
gl.enable(gl.BLEND);

gl.drawArrays(gl.POINTS, 0, 1);
// won't throw gl.INVALID\_OPERATION with the extension enabled
```

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

| Specification |
| --- |
| WebGL EXT\_float\_blend Extension Specification  |

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

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

See also
--------

* WebGL API
* Using WebGL extensions
* WebGL tutorial
* `WebGLRenderingContext.getExtension()`
* `EXT_color_buffer_float`
* `WEBGL_color_buffer_float`
* `WebGLRenderingContext.drawArrays()`
* `WebGLRenderingContext.drawElements()`
Ink
===

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

The **`Ink`** interface of the Ink API provides access to `InkPresenter` objects for the application to use to render ink strokes.

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

`requestPresenter()` 
Experimental

Returns a `Promise` that fulfills with an `InkPresenter` object to handle rendering strokes.

Example
-------


```js
async function inkInit() {
  const ink = navigator.ink;
  let presenter = await ink.requestPresenter({ presentationArea: canvas });

  //...
}
```

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

| Specification |
| --- |
| Ink API # ink-interface |

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

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

See also
--------

* Enhancing Inking on the Web
WebGLActiveInfo
===============

The **WebGLActiveInfo** interface is part of the WebGL API and represents the information returned by calling the `WebGLRenderingContext.getActiveAttrib()` and `WebGLRenderingContext.getActiveUniform()` methods.

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

`WebGLActiveInfo.name`

The read-only name of the requested variable.

`WebGLActiveInfo.size`

The read-only size of the requested variable.

`WebGLActiveInfo.type`

The read-only type of the requested variable.

Examples
--------

A `WebGLActiveInfo` object is returned by:

* `WebGLRenderingContext.getActiveAttrib()`
* `WebGLRenderingContext.getActiveUniform()` or
* `WebGL2RenderingContext.getTransformFeedbackVarying()`
Specifications
--------------

| Specification |
| --- |
| WebGL Specification # 5.11 |

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

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

See also
--------

* `WebGLRenderingContext.getActiveAttrib()`
* `WebGLRenderingContext.getActiveUniform()`
CSSMathProduct
==============

The **`CSSMathProduct`** interface of the CSS\_Object\_Model#css\_typed\_object\_model represents the result obtained by calling `add()`, `sub()`, or `toSum()` on `CSSNumericValue`. It inherits properties and methods from its parent `CSSNumericValue`.

CSSStyleValue

CSSNumericValue

CSSMathValue

CSSMathProductConstructor
-----------

`CSSMathProduct()` 
Experimental

Creates a new `CSSMathProduct` object.

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

`CSSMathProduct.values`

Returns a `CSSNumericArray` object which contains one or more `CSSNumericValue` objects.

Static methods
--------------

*The interface may also inherit methods from its parent interface, `CSSMathValue`.*

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

*The interface may also inherit methods from its parent interface, `CSSMathValue`.*

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

| Specification |
| --- |
| CSS Typed OM Level 1 # cssmathproduct |

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

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

The **`WheelEvent`** interface represents events that occur due to the user moving a mouse wheel or similar input device.

**Note:** This is the standard wheel event interface to use. Old versions of browsers implemented the non-standard and non-cross-browser-compatible `MouseWheelEvent` and `MouseScrollEvent` interfaces. Use this interface and avoid the non-standard ones.

**Note:** Do not confuse the `wheel` event with the `scroll` event. The default action of a `wheel` event is implementation-defined. Thus, a `wheel` event doesn't necessarily dispatch a `scroll` event. Even when it does, that doesn't mean that the `delta*` values in the `wheel` event necessarily reflect the content's scrolling direction. Therefore, do not rely on `delta*` properties to get the content's scrolling direction. Instead, detect value changes to `scrollLeft` and `scrollTop` of the target in the `scroll` event.

Event

UIEvent

MouseEvent

WheelEventConstructor
-----------

`WheelEvent()`

Creates a `WheelEvent` object.

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

*This interface inherits properties from its ancestors, `MouseEvent`, `UIEvent`, and `Event`.*

`WheelEvent.deltaX` Read only 

Returns a `double` representing the horizontal scroll amount.

`WheelEvent.deltaY` Read only 

Returns a `double` representing the vertical scroll amount.

`WheelEvent.deltaZ` Read only 

Returns a `double` representing the scroll amount for the z-axis.

`WheelEvent.deltaMode` Read only 

Returns an `unsigned long` representing the unit of the `delta*` values' scroll amount. Permitted values are:

| Constant | Value | Description |
| --- | --- | --- |
| `WheelEvent.DOM_DELTA_PIXEL` | `0x00` | The `delta*` values are specified in pixels. |
| `WheelEvent.DOM_DELTA_LINE` | `0x01` | The `delta*` values are specified in lines. Each mouse click scrolls a line of content, where the method used to calculate line height is browser dependent. |
| `WheelEvent.DOM_DELTA_PAGE` | `0x02` | The `delta*` values are specified in pages. Each mouse click scrolls a page of content. |

`WheelEvent.wheelDelta` Read only  
Deprecated

Non-standard

Returns an integer (32-bit) representing the distance in pixels.

`WheelEvent.wheelDeltaX` Read only  
Deprecated

Non-standard

Returns an integer representing the horizontal scroll amount.

`WheelEvent.wheelDeltaY` Read only  
Deprecated

Non-standard

Returns an integer representing the vertical scroll amount.


**Note:** Element: mousewheel event has additional documentation about the deprecated properties `wheelDelta`, `wheelDeltaX`, `wheelDeltaY`.

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

*This interface doesn't define any specific methods, but inherits methods from its ancestors, `MouseEvent`, `UIEvent`, and `Event`.*

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

| Specification |
| --- |
| UI Events # interface-wheelevent |

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

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

See also
--------

* `wheel` event
* Interfaces replaced by this one:
    + Gecko's legacy mouse wheel event object: `MouseScrollEvent`
SpeechRecognitionAlternative
============================

The **`SpeechRecognitionAlternative`** interface of the Web Speech API represents a single word that has been recognized by the speech recognition service.

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

`SpeechRecognitionAlternative.transcript` Read only 

Returns a string containing the transcript of the recognized word.

`SpeechRecognitionAlternative.confidence` Read only 

Returns a numeric estimate between 0 and 1 of how confident the speech recognition system is that the recognition is correct.

Examples
--------

 This code is excerpted from our
 Speech color changer example.


```js
recognition.onresult = (event) => {
  // The SpeechRecognitionEvent results property returns a SpeechRecognitionResultList object
  // The SpeechRecognitionResultList object contains SpeechRecognitionResult objects.
  // It has a getter so it can be accessed like an array
  // The first [0] returns the SpeechRecognitionResult at position 0.
  // Each SpeechRecognitionResult object contains SpeechRecognitionAlternative objects
  // that contain individual results.
  // These also have getters so they can be accessed like arrays.
  // The second [0] returns the SpeechRecognitionAlternative at position 0.
  // We then return the transcript property of the SpeechRecognitionAlternative object
  const color = event.results[0][0].transcript;
  diagnostic.textContent = `Result received: ${color}.`;
  bg.style.backgroundColor = color;
};
```

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

| Specification |
| --- |
| Web Speech API # speechreco-alternative |

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

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

See also
--------

* Web Speech API
clearTimeout() global function
==============================

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

 The global **`clearTimeout()`** method cancels a timeout previously established
 by calling `setTimeout()`.

 If the parameter provided does not identify a previously established action,
 this method does nothing.

Syntax
------


```js
clearTimeout(timeoutID)
```

### Parameters

`timeoutID`

 The identifier of the timeout you want to cancel. This ID was returned by the
 corresponding call to `setTimeout()`.



 It's worth noting that the pool of IDs used by
 `setTimeout()` and
 `setInterval()` are shared, which
 means you can technically use `clearTimeout()` and
 `clearInterval()`
 interchangeably. However, for clarity, you should avoid doing so.

### Return value

None (`undefined`).

Examples
--------

 Run the script below in the context of a web page and click on the page once. You'll
 see a message popping up in a second. If you click the page multiple times in
 one second, the alert only appears once.


```js
const alarm = {
  remind(aMessage) {
    alert(aMessage);
    this.timeoutID = undefined;
  },

  setup() {
    if (typeof this.timeoutID === "number") {
      this.cancel();
    }

    this.timeoutID = setTimeout(
      (msg) => {
        this.remind(msg);
      },
      1000,
      "Wake up!",
    );
  },

  cancel() {
    clearTimeout(this.timeoutID);
  },
};
window.addEventListener("click", () => alarm.setup());
```

Notes
-----

 Passing an invalid ID to `clearTimeout()` silently does nothing; no
 exception is thrown.

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

| Specification |
| --- |
| HTML Standard # dom-cleartimeout-dev |

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

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

See also
--------

* `setTimeout()`
* `setInterval()`
* `clearInterval()`
* `Window.requestAnimationFrame()`
SVGAnimatedLength
=================

The **`SVGAnimatedLength`** interface represents attributes of type <length> which can be animated.

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

`baseVal` Read only 

A `SVGLength` representing the base value of the given attribute before applying any animations.

`animVal` Read only 

 If the given attribute or property is being animated,
 a `SVGLength` containing the current animated value of the attribute or property.
 If the given attribute or property is not currently being animated,
 a `SVGLength` containing the same value as `baseVal`.


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

*This interface does not implement any specific methods.*

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

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

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

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

See also
--------

* `SVGLength`
XPathException
==============

**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.

In the DOM XPath API the **`XPathException`** interface represents exception conditions that can be encountered while performing XPath operations.

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

`XPathException.code` Read only 

Returns a `short` that contains one of the error code constants.

Constants
---------

| Constant | Value | Description |
| --- | --- | --- |
| `INVALID_EXPRESSION_ERR` | `51` | 
 If the expression has a syntax error or otherwise is not a legal
 expression according to the rules of the specific
 `XPathEvaluator` or contains specialized
 extension functions or variables not supported by this implementation.
  |
| `TYPE_ERR` | `52` | If the expression cannot be converted to return the specified type. |

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

#### No specification found

No specification data found for `api.XPathException`.  
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.

See also
--------

* `Document.createExpression()`
* `XPathExpression`
GeolocationPositionError
========================

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

The **`GeolocationPositionError`** interface represents the reason of an error occurring when using the geolocating device.

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

*The `GeolocationPositionError` interface doesn't inherit any property.*

`GeolocationPositionError.code` Read only 

Returns an `unsigned short` representing the error code. The following values are possible:

| Value | Associated constant | Description |
| --- | --- | --- |
| `1` | `PERMISSION_DENIED` | The acquisition of the geolocation information failed because the page didn't have the necessary permissions, for example because it is blocked by a Permissions Policy |
| `2` | `POSITION_UNAVAILABLE` | The acquisition of the geolocation failed because at least one internal source of position returned an internal error. |
| `3` | `TIMEOUT` | The time allowed to acquire the geolocation was reached before the information was obtained. |

`GeolocationPositionError.message` Read only 

Returns a human-readable string describing the details of the error. Specifications note that this is primarily intended for debugging use and not to be shown directly in a user interface.

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

*The `GeolocationPositionError` interface neither implements nor inherits any method.*

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

| Specification |
| --- |
| Geolocation API # position\_error\_interface |

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

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

See also
--------

* Using the Geolocation API
* `Geolocation`
SVGAnimateTransformElement
==========================

The `SVGAnimateTransformElement` interface corresponds to the `<animateTransform>` element.

EventTarget

Node

Element

SVGElement

SVGAnimationElement

SVGAnimateTransformElementInstance properties
-------------------

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

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

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

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

| Specification |
| --- |
| SVG Animations Level 2 # InterfaceSVGAnimateTransformElement |

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

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

**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 **`Bluetooth`** interface of the Web Bluetooth API returns a
 `Promise` to a `BluetoothDevice` object with the specified
 options.

EventTarget

BluetoothInstance properties
-------------------

*Inherits properties from its parent `EventTarget`.*

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

`Bluetooth.getAvailability()` 
Experimental

 Returns a `Promise` that resolved to a boolean value indicating
 whether the user-agent has the ability to support Bluetooth. Some user-agents let the
 user configure an option that affects what is returned by this value. If this option
 is set, that is the value returned by this method.


`Bluetooth.getDevices()` 
Experimental

 Returns a `Promise` that resolved to an array of
 `BluetoothDevice`s which the origin already obtained permission for via a
 call to `Bluetooth.requestDevice()`.


`Bluetooth.requestDevice()` 
Experimental

 Returns a `Promise` to a `BluetoothDevice` object with the
 specified options.


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

| Specification |
| --- |
| Web Bluetooth # bluetooth |

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

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

The **`HTMLSourceElement`** interface provides special properties (beyond the regular `HTMLElement` object interface it also has available to it by inheritance) for manipulating `<source>` elements.

EventTarget

Node

Element

HTMLElement

HTMLSourceElementInstance properties
-------------------

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

`HTMLSourceElement.media`

A string reflecting the `media` HTML attribute, containing the intended type of the media resource.

`HTMLSourceElement.sizes`

A string representing image sizes between breakpoints

`HTMLSourceElement.src`

A string reflecting the `src` HTML attribute, containing the URL for the media resource. The `HTMLSourceElement.src` property has a meaning only when the associated `<source>` element is nested in a media element that is a `<video>` or an `<audio>` element. It has no meaning and is ignored when it is nested in a `<picture>` element.

**Note:** If the `src` property is updated (along with any siblings), the parent `HTMLMediaElement`'s `load` method should be called when done, since `<source>` elements are not re-scanned automatically.

`HTMLSourceElement.srcset`

A string reflecting the `srcset` HTML attribute, containing a list of candidate images, separated by a comma (`',', U+002C COMMA`). A candidate image is a URL followed by a `'w'` with the width of the images, or an `'x'` followed by the pixel density.

`HTMLSourceElement.type`

A string reflecting the `type` HTML attribute, containing the type of the media resource.

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

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

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

| Specification |
| --- |
| HTML Standard # htmlsourceelement |

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

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

See also
--------

* The HTML element implementing this interface: `<source>`.
* The HTML DOM APIs of the elements that can contain a `<source>` element: `HTMLVideoElement`, `HTMLAudioElement`, `HTMLPictureElement`.