recursal/MDN huggingface dataset:
IIRFilterNode: IIRFilterNode() constructor
==========================================

 The **`IIRFilterNode()`** constructor
 of the Web Audio API creates a new
 `IIRFilterNode` object which an `AudioNode` processor
 which implements a general infinite impulse response filter.

Syntax
------


```js
new IIRFilterNode(context, options)
```

### Parameters

`context`

A reference to an `AudioContext`.

`options`

Options are as follows:

`feedforward`

A sequence of feedforward coefficients.

`feedback`

A sequence of feedback coefficients.

`channelCount`

 Represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node. (See
 `AudioNode.channelCount` for more information.) Its usage and precise
 definition depend on the value of `channelCountMode`.


`channelCountMode`

 Represents an enumerated value describing the way channels must be matched between
 the node's inputs and outputs. (See `AudioNode.channelCountMode` for more
 information including default values.)


`channelInterpretation`

 Represents an enumerated value describing the meaning of the channels. This
 interpretation will define how audio up-mixing and down-mixing will happen.
 The possible values are `"speakers"` or `"discrete"`. (See
 `AudioNode.channelCountMode` for more information including default
 values.)



 Unlike other nodes in the Web Audio API, the options passed into the IIR
 filter upon creation are not optional. The filter needs these values to work and with
 the vast range of filters available, there is no default.

### Return value

A new `IIRFilterNode` object instance.

Examples
--------


```js
let feedForward = [0.00020298, 0.0004059599, 0.00020298];
let feedBackward = [1.0126964558, -1.9991880801, 0.9873035442];

const AudioContext = window.AudioContext || window.webkitAudioContext;
const audioCtx = new AudioContext();

const iirFilter = new IIRFilterNode(audioCtx, {
  feedforward: feedForward,
  feedback: feedBackward,
});
```

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

| Specification |
| --- |
| Web Audio API # dom-iirfilternode-constructor-iirfilternode |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
VRLayerInit: leftBounds property
================================

**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 **`leftBounds`** property of the `VRLayerInit` interface (dictionary) defines the left texture bounds of the canvas whose contents will be presented by the `VRDisplay`.

**Note:** This property was part of the old WebVR API. It has been superseded by the WebXR Device API.

Value
-----

An array of four floating point values, which can take values from 0.0–1.0.

* The left offset of the bounds.
* The top offset of the bounds.
* The width of the bounds.
* The height of the bounds.

If `leftBounds` is not specified in the dictionary, the default value used is `[0.0, 0.0, 0.5, 1.0]`.

Examples
--------

See `VRLayerInit` for example code.

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

This property was part of the old WebVR API that has been superseded by the WebXR Device API. It is no longer on track to becoming a standard.

Until all browsers have implemented the new WebXR APIs, it is recommended to rely on frameworks, like A-Frame, Babylon.js, or Three.js, or a polyfill, to develop WebXR applications that will work across all browsers [1].

See also
--------

* WebVR API
VRLayerInit: source property
============================

**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 **`source`** property of the `VRLayerInit` interface (dictionary) defines the canvas whose contents will be presented by the `VRDisplay`.

**Note:** This property was part of the old WebVR API. It has been superseded by the WebXR Device API.

Value
-----

An `HTMLCanvasElement` or `OffscreenCanvas` object.

Examples
--------

See `VRLayerInit` for example code.

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

This property was part of the old WebVR API that has been superseded by the WebXR Device API. It is no longer on track to becoming a standard.

Until all browsers have implemented the new WebXR APIs, it is recommended to rely on frameworks, like A-Frame, Babylon.js, or Three.js, or a polyfill, to develop WebXR applications that will work across all browsers [1].

See also
--------

* WebVR API
VRLayerInit: rightBounds property
=================================

**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 **`rightBounds`** property of the `VRLayerInit` interface (dictionary) defines the right texture bounds of the canvas whose contents will be presented by the `VRDisplay`.

**Note:** This property was part of the old WebVR API. It has been superseded by the WebXR Device API.

Value
-----

An array of four floating point values, which can take values from 0.0–1.0:

1. The left offset of the bounds.
2. The top offset of the bounds.
3. The width of the bounds.
4. The height of the bounds.

If `leftBounds` is not specified in the dictionary, the default value used is `[0.5, 0.0, 0.5, 1.0]`.

Examples
--------

See `VRLayerInit` for example code.

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

This property was part of the old WebVR API that has been superseded by the WebXR Device API. It is no longer on track to becoming a standard.

Until all browsers have implemented the new WebXR APIs, it is recommended to rely on frameworks, like A-Frame, Babylon.js, or Three.js, or a polyfill, to develop WebXR applications that will work across all browsers [1].

See also
--------

* WebVR API
MediaKeyMessageEvent: messageType property
==========================================

 The **`MediaKeyMessageEvent.messageType`** read-only property indicates the
 type of message. It may be one of `license-request`,
 `license-renewal`, `license-release`, or
 `individualization-request`.

Value
-----

One of the following:

* `license-request`
* `license-renewal`
* `license-release`
* `individualization-request`
Specifications
--------------

| Specification |
| --- |
| Encrypted Media Extensions # dom-mediakeymessageevent-messagetype |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
MediaKeyMessageEvent: message property
======================================

 The **`MediaKeyMessageEvent.message`** read-only property
 returns an `ArrayBuffer` with a message from the content decryption module.
 Messages vary by key system.

Value
-----

An `ArrayBuffer`.

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

| Specification |
| --- |
| Encrypted Media Extensions # dom-mediakeymessageevent-message |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
MediaKeyMessageEvent: MediaKeyMessageEvent() constructor
========================================================

The **`MediaKeyMessageEvent`** constructor creates a new `MediaKeyMessageEvent` object.

Syntax
------


```js
new MediaKeyMessageEvent(type)
new MediaKeyMessageEvent(type, options)
```

### Parameters

`type`

 A string with the name of the event.
 It is case-sensitive and browsers always set it to `message`.


`options` Optional

An object that, *in addition of the properties defined in `Event()`*, can have the following properties:

`messageType`

 A message type that allows applications to differentiate messages without parsing them.
 Allowed values are: `license-request`, `license-renewal`, `license-renewal`, or `individualization-request`.


`message`

An array containing the message generated by the content decryption module.


### Return value

A new `MediaKeyMessageEvent` object.

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

| Specification |
| --- |
| Encrypted Media Extensions # constructors |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
HTMLTextAreaElement: select event
=================================

The **`select`** event fires when some text has been selected.

Syntax
------

Use the event name in methods like `addEventListener()`, or set an event handler property.


```js
addEventListener("select", (event) => {});

onselect = (event) => {};
```

Event type
----------

A generic `Event`.

Examples
--------

### Selection logger


```html
<textarea>Try selecting some text in this element.</textarea>
<p id="log"></p>
```



```js
function logSelection(event) {
  const log = document.getElementById("log");
  const selection = event.target.value.substring(
    event.target.selectionStart,
    event.target.selectionEnd,
  );
  log.textContent = `You selected: ${selection}`;
}

const textarea = document.querySelector("textarea");
textarea.addEventListener("select", logSelection);
```

### onselect equivalent

You can also set up the event handler using the `onselect` property:


```js
textarea.onselect = logSelection;
```

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

| Specification |
| --- |
| HTML Standard # event-select |
| HTML Standard # handler-onselect |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
HTMLTextAreaElement: labels property
====================================

 The **`HTMLTextAreaElement.labels`** read-only property returns
 a `NodeList` of the `<label>` elements associated with the
 `<textarea>` element.

Value
-----

 A `NodeList` containing the `<label>` elements associated
 with the `<textArea>` element.

Examples
--------

### HTML


```html
<label id="label1" for="test">Label 1</label>
<textarea id="test">Some text</textarea>
<label id="label2" for="test">Label 2</label>
```

### JavaScript


```js
window.addEventListener("DOMContentLoaded", () => {
  const textArea = document.getElementById("test");
  for (const label of textArea.labels) {
    console.log(label.textContent); // "Label 1" and "Label 2"
  }
});
```

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

| Specification |
| --- |
| HTML Standard # dom-lfe-labels-dev |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
HTMLTextAreaElement: selectionchange event
==========================================

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

 The **`selectionchange`** event of the Selection API is fired when the text selection within an `<textarea>` element is changed.
 This includes both changes in the selected range of characters, or if the caret moves.

This event is not cancelable.

The event is usually processed by adding an event listener on the `<textarea>`, and in the handler function read by the `HTMLTextAreaElement` `selectionStart`, `selectionEnd` and `selectionDirection` properties.

It is also possible to add a listener on the global `onselectionchange` event handler, and within the handler function use `Document.getSelection()` to get the `Selection`. However this is not very useful for getting changes to *text* selections.

Syntax
------

Use the event name in methods like `addEventListener()`, or set an event handler property.


```js
addEventListener("selectionchange", (event) => {});

onselectionchange = (event) => {};
```

Event type
----------

A generic `Event`.

Examples
--------

The example below shows how to get the text selected in an `<textarea>` element.

### HTML


```html
<div>
  Enter and select text here:<br /><textarea
 id="mytext"
 rows="2"
 cols="20"></textarea>
</div>
<div>selectionStart: <span id="start"></span></div>
<div>selectionEnd: <span id="end"></span></div>
<div>selectionDirection: <span id="direction"></span></div>
```

### JavaScript


```js
const myinput = document.getElementById("mytext");

myinput.addEventListener("selectionchange", () => {
  document.getElementById("start").textContent = myinput.selectionStart;
  document.getElementById("end").textContent = myinput.selectionEnd;
  document.getElementById("direction").textContent = myinput.selectionDirection;
});
```

### Result

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

| Specification |
| --- |
| Selection API # selectionchange-event |
| Selection API # dom-globaleventhandlers-onselectionchange |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
ScreenDetails: screens property
===============================

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

 The **`screens`** read-only property of the
 `ScreenDetails` interface contains an array of `ScreenDetailed` objects, each one representing detailed information about one specific screen available to the user's device.

Value
-----

An array of `ScreenDetailed` objects.

**Note:** `screens` only includes "extended" displays, not those that mirror another display.

Examples
--------

See the main `ScreenDetails` page for example usage.

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

| Specification |
| --- |
| Window Management # ref-for-dom-screendetails-screens |

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

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

See also
--------

* Window Management API
ScreenDetails: currentscreenchange event
========================================

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

The **`currentscreenchange`** event of the `ScreenDetails` interface is fired when the `ScreenDetails.currentScreen` changes in one of the following ways:

* The current screen changes to a different screen, i.e., the current browser window is moved to a different screen.
* One or more of the following properties change on the current screen:
    + `width`
    + `height`
    + `availWidth`
    + `availHeight`
    + `colorDepth`
    + `orientation`
* One or more of the following values change:
    + The screen's **position** ((x,y) coordinates of the top-left corner) inside the OS virtual screen arrangement, relative to the multi-screen origin
    + The screen's **available position** ((x,y) coordinates of the top-left corner) inside the OS virtual screen arrangement, relative to the multi-screen origin. This is equal to the screen position, plus the width/height of any OS UI elements drawn on the top-left of the screen — windows cannot be placed in those areas
    + `devicePixelRatio`
    + `label`
    + The screen's designation as primary or secondary (see `isPrimary`)
    + The screen's designation as internal or external (see `isInternal`)
Syntax
------

Use the event name in methods like `addEventListener()`, or set an event handler property.


```js
addEventListener("currentscreenchange", (event) => {});

oncurrentscreenchange = (event) => {};
```

Event type
----------

A generic `Event`.

Examples
--------


```js
const screenDetails = await window.getScreenDetails();
screenDetails.addEventListener("currentscreenchange", (event) => {
  const details = screenDetails.currentScreen;
  console.log("The current screen has changed.", event, details);
});
```

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

| Specification |
| --- |
| Window Management # eventdef-screendetails-currentscreenchange |
| Window Management # ref-for-dom-screendetails-oncurrentscreenchange |

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

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

See also
--------

* Window Management API
ScreenDetails: screenschange event
==================================

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

The **`screenschange`** event of the `ScreenDetails` interface is fired when the set of screens available to the system has changed: that is, a new screen has become available or an existing screen has become unavailable. This will be reflected in a change in the `screens` array.

Syntax
------

Use the event name in methods like `addEventListener()`, or set an event handler property.


```js
addEventListener("screenschange", (event) => {});

onscreenschange = (event) => {};
```

Event type
----------

A generic `Event`.

Examples
--------

You could use the `screenschange` event to detect when the available screens have changed, report the change, close all windows, and then reopen them all to suit the new configuration:


```js
const screenDetails = await window.getScreenDetails();

// Return the number of screens
let noOfScreens = screenDetails.screens.length;

screenDetails.addEventListener("screenschange", () => {
  // If the new number of screens is different to the old number of screens, report the difference
  if (screenDetails.screens.length !== noOfScreens) {
    console.log(
      `The screen count changed from ${noOfScreens} to ${screenDetails.screens.length}`,
    );

    // Update noOfScreens value
    noOfScreens = screenDetails.screens.length;
  }

  // Open, close, or rearrange windows as needed, to fit the new screen configuration
  updateWindows();
});
```

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

| Specification |
| --- |
| Window Management # eventdef-screendetails-screenschange |
| Window Management # ref-for-dom-screendetails-onscreenschange |

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

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

See also
--------

* Window Management API
ScreenDetails: currentScreen property
=====================================

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

 The **`currentScreen`** read-only property of the
 `ScreenDetails` interface contains a single `ScreenDetailed` object representing detailed information about the screen that the current browser window is displayed in.

Value
-----

A `ScreenDetailed` object.

Examples
--------


```js
// Utility function for opening new windows
function openWindow(left, top, width, height, url) {
  const windowFeatures = `left=${left},top=${top},width=${width},height=${height}`;
  return window.open(url, "\_blank", windowFeatures);
}

// Open a new window that fills the available area of the current screen.
const currentScreen = (await window.getScreenDetails()).currentScreen;
console.log(`Opening a window to fill screen ${currentScreen.label}`);
const windowRef = openWindow(
  currentScreen.availLeft,
  currentScreen.availTop,
  currentScreen.availWidth,
  currentScreen.availHeight,
  url,
);
```

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

| Specification |
| --- |
| Window Management # ref-for-dom-screendetails-currentscreen |

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

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

See also
--------

* Window Management API
Gyroscope: y property
=====================

The **`y`** read-only property of the `Gyroscope` interface returns a number specifying the angular velocity of the device along its y-axis.

Value
-----

A `Number`.

Examples
--------

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


```js
let gyroscope = new Gyroscope({ frequency: 60 });

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

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

| Specification |
| --- |
| Gyroscope # gyroscope-y |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
Gyroscope: x property
=====================

 The **`x`** read-only property of the
 `Gyroscope` interface returns a number specifying the
 angular velocity of the device along its x-axis.

Value
-----

A `Number`.

Examples
--------

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


```js
let gyroscope = new Gyroscope({ frequency: 60 });

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

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

| Specification |
| --- |
| Gyroscope # gyroscope-x |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
Gyroscope: z property
=====================

 The **`z`** read-only property of the
 `Gyroscope` interface returns a number specifying the
 angular velocity of the device along its z-axis.

Value
-----

A `Number`.

Examples
--------

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


```js
let gyroscope = new Gyroscope({ frequency: 60 });

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

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

| Specification |
| --- |
| Gyroscope # gyroscope-z |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
Gyroscope: Gyroscope() constructor
==================================

 The **`Gyroscope()`** constructor
 creates a new `Gyroscope` object which provides on each reading the
 angular velocity of the device along all three axes.

Syntax
------


```js
new Gyroscope()
new Gyroscope(options)
```

### Parameters

`options` Optional

Options are as follows:

`frequency`

 The desired number of times per second a sample should
 be taken, meaning the number of times per second that the
 `reading` event will be called. A whole number or decimal may be
 used, the latter for frequencies less than a second. The actual reading frequency
 depends device hardware and consequently may be less than requested.


`referenceFrame`

 Either `'device'` or
 `'screen'`. The default is `'device'`.



### Exceptions

`SecurityError` `DOMException`

Use of this feature was blocked by a Permissions Policy.

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

| Specification |
| --- |
| Gyroscope # dom-gyroscope-gyroscope |

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

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

See also
--------

* `reading` event