recursal/MDN huggingface dataset:
MediaStreamTrackAudioSourceNode
===============================

The **`MediaStreamTrackAudioSourceNode`** interface is a type of `AudioNode` which represents a source of audio data taken from a specific `MediaStreamTrack` obtained through the WebRTC or Media Capture and Streams APIs.

The audio itself might be input from a microphone or other audio sampling device, or might be received through a `RTCPeerConnection`, among other possible options.

A `MediaStreamTrackAudioSourceNode` has no inputs and exactly one output, and is created using the `AudioContext.createMediaStreamTrackSource()` method. This interface is similar to `MediaStreamAudioSourceNode`, except it lets you specifically state the track to use, rather than assuming the first audio track on a stream.

EventTarget

AudioNode

MediaStreamTrackAudioSourceNode

|  |  |
| --- | --- |
| Number of inputs | `0` |
| Number of outputs | `1` |
| Channel count | 
 defined by the first audio `MediaStreamTrack`
 passed to the
 `AudioContext.createMediaStreamTrackSource()`
 method that created it.
  |

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

`new MediaStreamTrackAudioSourceNode()`

Creates a new `MediaStreamTrackAudioSourceNode` object instance with the specified options.

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

*The `MediaStreamTrackAudioSourceNode` interface has no properties of its own; however, it inherits the properties of its parent, `AudioNode`.*

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

*Inherits methods from its parent, `AudioNode`*.

Example
-------

See `AudioContext.createMediaStreamSource()` for example code that uses this object.

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

| Specification |
| --- |
| Web Audio API # MediaStreamTrackAudioSourceNode |

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

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

See also
--------

* Using the Web Audio API
* WebRTC API
* Media Capture and Streams API (Media Streams)
* `MediaStreamAudioSourceNode`
StereoPannerNode
================

The `StereoPannerNode` interface of the Web Audio API represents a simple stereo panner node that can be used to pan an audio stream left or right. It is an `AudioNode` audio-processing module that positions an incoming audio stream in a stereo image using a low-cost equal-power panning algorithm.

The `pan` property takes a unitless value between `-1` (full left pan) and `1` (full right pan). This interface was introduced as a much simpler way to apply a simple panning effect than having to use a full `PannerNode`.

![The Stereo Panner Node moved the sound's position from the center of two speakers to the left.](/en-US/docs/Web/API/StereoPannerNode/stereopannernode.png)

EventTarget

AudioNode

StereoPannerNode

|  |  |
| --- | --- |
| Number of inputs | `1` |
| Number of outputs | `1` |
| Channel count mode | `"clamped-max"` |
| Channel count | `2` |
| Channel interpretation | `"speakers"` |

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

`StereoPannerNode()`

Creates a new instance of a `StereoPannerNode` object.

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

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

`StereoPannerNode.pan` Read only 

An a-rate `AudioParam` representing the amount of panning to apply.

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

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

Example
-------

See `BaseAudioContext.createStereoPanner()` for example code.

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

| Specification |
| --- |
| Web Audio API # stereopannernode |

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

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

See also
--------

* Using the Web Audio API
DeviceMotionEventRotationRate
=============================

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

A **`DeviceMotionEventRotationRate`** interface of the Device Orientation Events provides information about the rate at which the device is rotating around all three axes.

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

`DeviceMotionEventRotationRate.alpha` Read only 

The amount of rotation around the Z axis, in degrees per second.

`DeviceMotionEventRotationRate.beta` Read only 

The amount of rotation around the X axis, in degrees per second.

`DeviceMotionEventRotationRate.gamma` Read only 

The amount of rotation around the Y axis, in degrees per second.

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

| Specification |
| --- |
| DeviceOrientation Event Specification # devicemotioneventrotationrate |

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

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

The `MediaElementAudioSourceNode` interface represents an audio source consisting of an HTML `<audio>` or `<video>` element. It is an `AudioNode` that acts as an audio source.

A `MediaElementAudioSourceNode` has no inputs and exactly one output, and is created using the `AudioContext.createMediaElementSource()` method. The number of channels in the output equals the number of channels of the audio referenced by the `HTMLMediaElement` used in the creation of the node, or is 1 if the `HTMLMediaElement` has no audio.

EventTarget

AudioNode

MediaElementAudioSourceNode

|  |  |
| --- | --- |
| Number of inputs | `0` |
| Number of outputs | `1` |
| Channel count | 2 (but note that `AudioNode.channelCount` is only used for up-mixing and down-mixing `AudioNode` inputs, and `MediaElementAudioSourceNode` doesn't have any input) |

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

`MediaElementAudioSourceNode()`

Creates a new `MediaElementAudioSourceNode` object instance.

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

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

`mediaElement` Read only 

The `HTMLMediaElement` used when constructing this `MediaStreamAudioSourceNode`.

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

*Inherits methods from its parent, `AudioNode`*.

Example
-------

See `AudioContext.createMediaElementSource()` for example code.

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

| Specification |
| --- |
| Web Audio API # MediaElementAudioSourceNode |

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

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

See also
--------

* Using the Web Audio API
CSSFontPaletteValuesRule
========================

The **`CSSFontPaletteValuesRule`** interface represents an `@font-palette-values` at-rule.

CSSRule

CSSFontPaletteValuesRuleInstance properties
-------------------

*Inherits properties from its ancestor `CSSRule`.*

`CSSFontPaletteValuesRule.name` Read only 

A string with the name of the font palette.

`CSSFontPaletteValuesRule.fontFamily` Read only 

A string indicating the font families on which the rule has to be applied.

`CSSFontPaletteValuesRule.basePalette` Read only 

A string indicating the base palette associated with the rule.

`CSSFontPaletteValuesRule.overrideColors` Read only 

A string indicating the colors of the base palette that are overwritten and the new colors.

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

*Inherits methods from its ancestor `CSSRule`.*

Examples
--------

### Read associated font family using CSSOM

This example first defines an `@import` and an `@font-palette-values` at-rule. Then it reads the `@font-palette-values` rule and displays its name. As these rules live in the last stylesheet added to the document, the palette will be the second `CSSRule` returned by the last stylesheet in the document (`document.styleSheets[document.styleSheets.length-1].cssRules`). So, `rules[1]` returns a `CSSFontPaletteValuesRule` object, from which we can access `fontFamily`.

#### HTML


```html
<pre id="log">The @font-palette-values at-rule font families:</pre>
```


#### CSS


```css
@import url(https://fonts.googleapis.com/css2?family=Bungee+Spice);

@font-palette-values --Alternate {
  font-family: "Bungee Spice";
  override-colors:
    0 #00ffbb,
    1 #007744;
}

.alternate {
  font-palette: --Alternate;
}
```


#### JavaScript


```js
const log = document.getElementById("log");

const rules = document.styleSheets[document.styleSheets.length - 1].cssRules;
const fontPaletteValuesRule = rules[1]; // aA CSSFontPaletteValuesRule interface
log.textContent += ` ${fontPaletteValuesRule.fontFamily}`;
```


#### Result

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

| Specification |
| --- |
| CSS Fonts Module Level 4 # om-fontpalettevalues |

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

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

See also
--------

* `@font-palette-values`
RTCSessionDescription
=====================

The **`RTCSessionDescription`** interface describes one end of a connection—or potential connection—and how it's configured. Each `RTCSessionDescription` consists of a description `type` indicating which part of the offer/answer negotiation process it describes and of the SDP descriptor of the session.

The process of negotiating a connection between two peers involves exchanging `RTCSessionDescription` objects back and forth, with each description suggesting one combination of connection configuration options that the sender of the description supports. Once the two peers agree upon a configuration for the connection, negotiation is complete.

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

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

`RTCSessionDescription.type` Read only 

An enum describing the session description's type.

`RTCSessionDescription.sdp` Read only 

A string containing the SDP describing the session.

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

*The `RTCSessionDescription` doesn't inherit any methods.*

`RTCSessionDescription()` 
Deprecated

This constructor returns a new `RTCSessionDescription`. The parameter is a `RTCSessionDescriptionInit` dictionary containing the values to assign the two properties.

`RTCSessionDescription.toJSON()`

Returns a JSON description of the object. The values of both properties, `type` and `sdp`, are contained in the generated JSON.

Example
-------


```js
signalingChannel.onmessage = (evt) => {
  if (!pc) start(false);

  const message = JSON.parse(evt.data);
  if (message.sdp) {
    pc.setRemoteDescription(
      new RTCSessionDescription(message),
      () => {
        // if we received an offer, we need to answer
        if (pc.remoteDescription.type === "offer") {
          pc.createAnswer(localDescCreated, logError);
        }
      },
      logError,
    );
  } else {
    pc.addIceCandidate(
      new RTCIceCandidate(message.candidate),
      () => {},
      logError,
    );
  }
};
```

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

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # rtcsessiondescription-class |

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

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

See also
--------

* WebRTC
* `RTCPeerConnection.setLocalDescription()` and `RTCPeerConnection.setRemoteDescription()`
XMLHttpRequestEventTarget
=========================

`XMLHttpRequestEventTarget` is the interface that describes the event handlers shared on `XMLHttpRequest` and `XMLHttpRequestUpload`.

You don't use `XMLHttpRequestEventTarget` directly; instead you interact with the sub classes.

Inheritance for `XMLHttpRequest`
--------------------------------

EventTarget

XMLHttpRequestEventTarget

XMLHttpRequest
The following events are made available to `XMLHttpRequest`:

* `abort`
* `error`
* `load`
* `loadend`
* `loadstart`
* `progress`
* `readystatechange`
* `timeout`
Inheritance for `XMLHttpRequestUpload`
--------------------------------------

EventTarget

XMLHttpRequestEventTarget

XMLHttpRequestUpload
The following events are made available to `XMLHttpRequestUpload`:

* `abort`
* `error`
* `load`
* `loadend`
* `loadstart`
* `progress`
* `timeout`
Specifications
--------------

| Specification |
| --- |
| XMLHttpRequest Standard # xmlhttprequesteventtarget |

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

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

See also
--------

* `XMLHttpRequest`
* `XMLHttpRequestUpload`
RadioNodeList
=============

The **`RadioNodeList`** interface represents a collection of elements in a `<form>` or a `<fieldset>` element, returned by a call to `HTMLFormControlsCollection.namedItem()`.

NodeList

RadioNodeListInstance properties
-------------------

*The `RadioNodeList` interface inherits the properties of* `NodeList`.

`RadioNodeList.value`

If the underlying element collection contains radio buttons, the `value` property represents the checked radio button. On retrieving the `value` property, the `value` of the currently `checked` radio button is returned as a string. If the collection does not contain any radio buttons or none of the radio buttons in the collection is in `checked` state, the empty string is returned. On setting the `value` property, the first radio button input element whose `value` property is equal to the new value will be set to `checked`.

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

*The `RadioNodeList` interface inherits the methods of* `NodeList`.

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

| Specification |
| --- |
| HTML Standard # radionodelist |

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

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

See also
--------

* The `<form>`, `<fieldset>`, `<input>` elements.
RTCErrorEvent
=============

The WebRTC API's **`RTCErrorEvent`** interface represents an error sent to a WebRTC object. It's based on the standard `Event` interface, but adds RTC-specific information describing the error, as shown below.

Event

RTCErrorEventConstructor
-----------

`RTCErrorEvent()`

Creates and returns a new `RTCErrorEvent` object.

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

*In addition to the standard properties available on the `Event` interface, `RTCErrorEvent` also includes the following:*

`error` Read only 

An `RTCError` object specifying the error which occurred; this object includes the type of error that occurred, information about where the error occurred (such as which line number in the SDP or what SCTP cause code was at issue).

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

*No additional methods are provided beyond any found on the parent interface, `Event`.*

Description
-----------

There are other data types used for error events in WebRTC, as needed for errors with special information sharing requirements. The most common of these is probably `RTCPeerConnectionIceErrorEvent`, used by the `icecandidateerror` event, which signals an error that has occurred while gathering ICE candidates during connection negotiation.

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

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

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

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

See also
--------

* WebRTC API
* `RTCError`
* The `error` event occurs on the following interfaces: `RTCDataChannel` and `RTCDtlsTransport`
* `RTCPeerConnectionIceErrorEvent`
Magnetometer
============

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

The **`Magnetometer`** interface of the Sensor APIs provides information about the magnetic field as detected by the device's primary magnetometer sensor.

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

EventTarget

Sensor

MagnetometerConstructor
-----------

`Magnetometer()` 
Experimental

Creates a new `Magnetometer` object.

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

`Magnetometer.x` Read only  
Experimental

Returns a double containing the magnetic field around the device's x axis.

`Magnetometer.y` Read only  
Experimental

Returns a double containing the magnetic field around the device's y axis.

`Magnetometer.z` Read only  
Experimental

Returns a double containing the magnetic field around the device's z axis.

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

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

Events
------

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

Example
-------

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


```js
let magSensor = new Magnetometer({ frequency: 60 });

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

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

| Specification |
| --- |
| Magnetometer # magnetometer-interface |

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

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

The **`DataTransferItem`** object represents one drag data item. During a *drag operation*, each `drag event` has a `dataTransfer` property which contains a `list` of drag data items. Each item in the list is a `DataTransferItem` object.

This interface has no constructor.

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

`DataTransferItem.kind` Read only 

The *kind* of drag data item, `string` or `file`.

`DataTransferItem.type` Read only 

The drag data item's type, typically a MIME type.

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

`DataTransferItem.getAsFile()`

Returns the `File` object associated with the drag data item (or null if the drag item is not a file).

`DataTransferItem.getAsFileSystemHandle()` 
Experimental

Returns a `FileSystemFileHandle` if the dragged item is a file, or a `FileSystemDirectoryHandle` if the dragged item is a directory.

`DataTransferItem.getAsString()`

Invokes the specified callback with the drag data item string as its argument.

`DataTransferItem.webkitGetAsEntry()`

Returns an object based on `FileSystemEntry` representing the selected file's entry in its file system. This will generally be either a `FileSystemFileEntry` or `FileSystemDirectoryEntry` object.

Example
-------

All of this interface's methods and properties have their own reference page, and each reference page has an example of its usage.

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

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

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

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

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

The GamepadEvent interface of the Gamepad API contains references to gamepads connected to the system, which is what the gamepad events `gamepadconnected` and `gamepaddisconnected` are fired in response to.

Event

GamepadEventConstructor
-----------

`GamepadEvent()`

Returns a new `GamepadEvent` object.

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

`GamepadEvent.gamepad` Read only 

Returns a `Gamepad` object, providing access to the associated gamepad data for the event fired.

Examples
--------

The gamepad property being called on a fired `gamepadconnected` event.


```js
window.addEventListener("gamepadconnected", (e) => {
  console.log(
    "Gamepad connected at index %d: %s. %d buttons, %d axes.",
    e.gamepad.index,
    e.gamepad.id,
    e.gamepad.buttons.length,
    e.gamepad.axes.length,
  );
});
```


And on a `gamepaddisconnected` event.


```js
window.addEventListener("gamepaddisconnected", (e) => {
  console.log(
    "Gamepad disconnected from index %d: %s",
    e.gamepad.index,
    e.gamepad.id,
  );
});
```

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

| Specification |
| --- |
| Gamepad # gamepadevent-interface |

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

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

See also
--------

Using the Gamepad API
NavigationDestination
=====================

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

The **`NavigationDestination`** interface of the Navigation API represents the destination being navigated to in the current navigation.

It is accessed via the `NavigateEvent.destination` property.

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

`id` Read only  
Experimental

Returns the `id` value of the destination `NavigationHistoryEntry` if the `NavigateEvent.navigationType` is `traverse`, or an empty string otherwise.

`index` Read only  
Experimental

Returns the `index` value of the destination `NavigationHistoryEntry` if the `NavigateEvent.navigationType` is `traverse`, or `-1` otherwise.

`key` Read only  
Experimental

Returns the `key` value of the destination `NavigationHistoryEntry` if the `NavigateEvent.navigationType` is `traverse`, or an empty string otherwise.

`sameDocument` Read only  
Experimental

Returns `true` if the navigation is to the same `document` as the current `Document` value, or `false` otherwise.

`url` Read only  
Experimental

Returns the URL being navigated to.

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

`getState()` 
Experimental

Returns a clone of the available state associated with the destination `NavigationHistoryEntry`, or navigation operation (e.g. `navigate()`) as appropriate.

Examples
--------


```js
navigation.addEventListener("navigate", (event) => {
  // Exit early if this navigation shouldn't be intercepted,
  // e.g. if the navigation is cross-origin, or a download request
  if (shouldNotIntercept(event)) {
    return;
  }

  // Returns a URL() object constructed from the
  // NavigationDestination.url value
  const url = new URL(event.destination.url);

  if (url.pathname.startsWith("/articles/")) {
    event.intercept({
      async handler() {
        // The URL has already changed, so show a placeholder while
        // fetching the new content, such as a spinner or loading page
        renderArticlePagePlaceholder();

        // Fetch the new content and display when ready
        const articleContent = await getArticleContent(url.pathname);
        renderArticlePage(articleContent);
      },
    });
  }
});
```

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

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

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

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

See also
--------

* Modern client-side routing: the Navigation API
* Navigation API explainer
* Domenic Denicola's Navigation API live demo