recursal/MDN huggingface dataset:
MouseScrollEvent
================

**Non-standard:** This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

**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 **`MouseScrollEvent`** interface represents events that occur due to the user moving a mouse wheel or similar input device.

**Warning:** Do not use this interface for wheel events.

Like `MouseWheelEvent`, this interface is non-standard and deprecated. It was used in Gecko-based browsers only. Instead use the standard *`WheelEvent`.*

Method overview
---------------


```webidl
void initMouseScrollEvent(
  in DOMString typeArg,
  in boolean canBubbleArg,
  in boolean cancelableArg,
  in nsIDOMAbstractView viewArg,
  in long detailArg,
  in long screenXArg,
  in long screenYArg,
  in long clientXArg,
  in long clientYArg,
  in boolean ctrlKeyArg,
  in boolean altKeyArg,
  in boolean shiftKeyArg,
  in boolean metaKeyArg,
  in unsigned short buttonArg,
  in nsIDOMEventTarget relatedTargetArg,
  in long axis);
```

Attributes
----------

| Attribute | Type | Description |
| --- | --- | --- |
| `axis` Read only  | `long` | Indicates scroll direction. |

Constants
---------

### Delta modes

| Constant | Value | Description |
| --- | --- | --- |
| `HORIZONTAL_AXIS` | `0x01` | The event is caused by horizontal wheel operation. |
| `VERTICAL_AXIS` | `0x02` | The event is caused by vertical wheel operation. |

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

`initMouseScrollEvent()`

See `nsIDOMMouseScrollEvent::initMouseScrollEvent()`.

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

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

See also
--------

* `DOMMouseScroll`
* `MozMousePixelScroll`
* Standardized mouse wheel event object: `WheelEvent`
HTMLBRElement
=============

The **`HTMLBRElement`** interface represents an HTML line break element (`<br>`). It inherits from `HTMLElement`.

EventTarget

Node

Element

HTMLElement

HTMLBRElementInstance properties
-------------------

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

`HTMLBRElement.clear` 
Deprecated

A string indicating the flow of text around floating objects.

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

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

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

| Specification |
| --- |
| HTML Standard # htmlbrelement |

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

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

See also
--------

* HTML element implementing this interface: `<br>`
XRMediaBinding
==============

**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 **`XRMediaBinding`** interface is used to create layers that display the content of an `HTMLVideoElement`.

**Note:**
 Only the video frames will be displayed in the layer. Video controls need to be implemented separately and must be drawn in another layer.


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

`XRMediaBinding()` 
Experimental

Creates a new `XRMediaBinding` object for the specified `XRSession`.

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

`XRMediaBinding.createCylinderLayer()` 
Experimental

Returns an `XRCylinderLayer` object bound to an `HTMLVideoElement`.

`XRMediaBinding.createEquirectLayer()` 
Experimental

Returns an `XREquirectLayer` object bound to an `HTMLVideoElement`.

`XRMediaBinding.createQuadLayer()` 
Experimental

Returns an `XRQuadLayer` object bound to an `HTMLVideoElement`.

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

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

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

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

See also
--------

* `HTMLVideoElement`
* `XRCylinderLayer`, `XREquirectLayer`, `XRQuadLayer`
HID
===

Limited availability
--------------------

This feature is not Baseline because it does not work in some of the most widely-used browsers.

* Learn more
* See full compatibility
* Report feedback
**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 **`HID`** interface provides methods for connecting to *HID devices*, listing attached HID devices and event handlers for connected HID devices.

EventTarget

HIDInstance properties
-------------------

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

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

*This interface also inherits methods of its parent, `EventTarget`.*

`getDevices()` 
Experimental

Returns a `Promise` that resolves with an array of connected `HIDDevice` objects.

`requestDevice()` 
Experimental

Returns a `Promise` that resolves with an array of connected `HIDDevice` objects. Calling this function will trigger the user agent's permission flow in order to gain permission to access one selected device from the returned list of devices.

### Events

`connect` 
Experimental

Fired when an HID device is connected.

`disconnect` 
Experimental

Fired when an HID device is disconnected.

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

| Specification |
| --- |
| WebHID API # dom-hid |

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

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

See also
--------

* `WebHID API`
Web NFC API
===========

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

The Web NFC API allows exchanging data over NFC via light-weight NFC Data Exchange Format (NDEF) messages.

**Note:** Devices and tags have to be formatted and recorded specifically to support NDEF record format to be used with Web NFC. Low-level operations are currently not supported by the API, however there is a public discussion about API that would add such functionality.

Interfaces
----------

`NDEFMessage`

Interface that represents NDEF messages that can be received from or sent to a compatible tag via a `NDEFReader` object. A message is composed of metadata and NDEF Records.

`NDEFReader` 
Experimental

Interface that enables reading and writing messages from compatible NFC tags. The messages are represented as `NDEFMessage` objects.

`NDEFRecord`

Interface that represents NDEF records that can be included in an NDEF message.

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

| Specification |
| --- |
| Web NFC API # the-ndefreader-object |

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

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

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

The **`MediaSourceHandle`** interface of the Media Source Extensions API is a proxy for a `MediaSource` that can be transferred from a dedicated worker back to the main thread and attached to a media element via its `HTMLMediaElement.srcObject` property. `MediaSource` objects are not transferable because they are event targets, hence the need for `MediaSourceHandle`s.

It can be accessed via the `MediaSource.handle` property.

Each `MediaSource` object created inside a dedicated worker has its own distinct `MediaSourceHandle`. The `MediaSource.handle` getter will always return the `MediaSourceHandle` instance specific to the associated dedicated worker `MediaSource` instance. If the handle has already been transferred to the main thread using `postMessage()`, the handle instance in the worker is technically detached and can't be transferred again.

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

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

None.

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

None.

Examples
--------

The `handle` property can be accessed inside a dedicated worker and the resulting `MediaSourceHandle` object is then transferred over to the thread that created the worker (in this case the main thread) via a `postMessage()` call:


```js
// Inside dedicated worker
let mediaSource = new MediaSource();
let handle = mediaSource.handle;
// Transfer the handle to the context that created the worker
postMessage({ arg: handle }, [handle]);

mediaSource.addEventListener("sourceopen", () => {
  // Await sourceopen on MediaSource before creating SourceBuffers
  // and populating them with fetched media — MediaSource won't
  // accept creation of SourceBuffers until it is attached to the
  // HTMLMediaElement and its readyState is "open"
});
```


Over in the main thread, we receive the handle via a `message` event handler, attach it to a `<video>` via its `HTMLMediaElement.srcObject` property, and `play` the video:


```js
worker.addEventListener("message", (msg) => {
  let mediaSourceHandle = msg.data.arg;
  video.srcObject = mediaSourceHandle;
  video.play();
});
```


**Note:** `MediaSourceHandle`s cannot be successfully transferred into or via a shared worker or service worker.

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

| Specification |
| --- |
| Media Source Extensions™ # mediasourcehandle |

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

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

See also
--------

* MSE-in-Workers Demo by Matt Wolenetz
* Media Source Extensions API
* `MediaSource`
* `SourceBuffer`
LaunchQueue
===========

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

The **`LaunchQueue`** interface of the Launch Handler API is available via the `Window.launchQueue` property. When a progressive web app (PWA) is launched with a `launch_handler` `client_mode` value of `focus-existing`, `navigate-new`, or `navigate-existing`, `LaunchQueue` provides access to functionality that allows custom launch navigation handling to be implemented in the PWA. This functionality is controlled by the properties of the `LaunchParams` object passed into the `setConsumer()` callback function.

Instance Methods
----------------

`setConsumer()` 
Experimental

Contains a callback function that handles custom launch navigation for a PWA.

Examples
--------


```js
if ("launchQueue" in window) {
  window.launchQueue.setConsumer((launchParams) => {
    if (launchParams.targetURL) {
      const params = new URL(launchParams.targetURL).searchParams;

      // Assuming a music player app that gets a track passed to it to be played
      const track = params.get("track");
      if (track) {
        audio.src = track;
        title.textContent = new URL(track).pathname.substr(1);
        audio.play();
      }
    }
  });
}
```

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

| Specification |
| --- |
| Web App Launch Handler API # launchqueue-interface |

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

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

See also
--------

* Launch Handler API: Control how your app is launched
* `Window.launchQueue`
* Musicr 2.0 demo app
RsaPssParams
============

The **`RsaPssParams`** dictionary of the Web Crypto API represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()`, when using the RSA-PSS algorithm.

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

`name`

A string. This should be set to `RSA-PSS`.

`saltLength`

A `long` integer representing the length of the random salt to use, in bytes.

RFC 3447 says that "Typical salt lengths" are either 0 or the length of the output of the digest algorithm that was selected when this key was generated. For example, if you use SHA-256 as the digest algorithm, this could be 32.

The maximum size of `saltLength` is given by:


```js
Math.ceil((keySizeInBits - 1) / 8) - digestSizeInBytes - 2;
```


So for a key length of 2048 bits and a digest output size of 32 bytes, the maximum size would be 222.

Examples
--------

See the examples for `SubtleCrypto.sign()` and `SubtleCrypto.verify()`.

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

| Specification |
| --- |
| Web Cryptography API # dfn-RsaPssParams |

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

Browsers that support the "RSA-PSS" algorithm for the `SubtleCrypto.sign()` and `SubtleCrypto.verify()` methods will support this type.

See also
--------

* RFC 3447: RSASSA-PSS
MediaList
=========

The **`MediaList`** interface represents the media queries of a stylesheet, e.g. those set using a `<link>` element's `media` attribute.

**Note:** `MediaList` is a live list; updating the list using properties or methods listed below will immediately update the behavior of the document.

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

`MediaList.mediaText`

A stringifier that returns a string representing the `MediaList` as text, and also allows you to set a new `MediaList`.

`MediaList.length` Read only 

Returns the number of media queries in the `MediaList`.

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

`MediaList.appendMedium()`

Adds a media query to the `MediaList`.

`MediaList.deleteMedium()`

Removes a media query from the `MediaList`.

`MediaList.item()`

A getter that returns a string representing a media query as text, given the media query's index value inside the `MediaList`. This method can also be called using the bracket (`[]`) syntax.

Examples
--------

The following would log to the console a textual representation of the `MediaList` of the first stylesheet applied to the current document.


```js
const stylesheets = document.styleSheets;
let stylesheet = stylesheets[0];
console.log(stylesheet.media.mediaText);
```

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

| Specification |
| --- |
| CSS Object Model (CSSOM) # the-medialist-interface |

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

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

The **`WebGLTransformFeedback`** interface is part of the WebGL 2 API and enables transform feedback, which is the process of capturing primitives generated by vertex processing. It allows to preserve the post-transform rendering state of an object and resubmit this data multiple times.

WebGLObject

WebGLTransformFeedback
When working with `WebGLTransformFeedback` objects, the following methods of the `WebGL2RenderingContext` are useful:

* `WebGL2RenderingContext.createTransformFeedback()`
* `WebGL2RenderingContext.deleteTransformFeedback()`
* `WebGL2RenderingContext.isTransformFeedback()`
* `WebGL2RenderingContext.bindTransformFeedback()`
* `WebGL2RenderingContext.beginTransformFeedback()`
* `WebGL2RenderingContext.endTransformFeedback()`
* `WebGL2RenderingContext.pauseTransformFeedback()`
* `WebGL2RenderingContext.resumeTransformFeedback()`
* `WebGL2RenderingContext.transformFeedbackVaryings()`
* `WebGL2RenderingContext.getTransformFeedbackVarying()`
Examples
--------

### Creating a `WebGLTransformFeedback` object

in this example, `gl` must be a `WebGL2RenderingContext`. `WebGLTransformFeedback` objects are not available in WebGL 1.


```js
const transformFeedback = gl.createTransformFeedback();
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.5 |

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

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

 The **`HTMLMetaElement`** interface contains descriptive metadata about a document provided in HTML as `<meta>` elements.
 This interface inherits all of the properties and methods described in the `HTMLElement` interface.

EventTarget

Node

Element

HTMLElement

HTMLMetaElementInstance properties
-------------------

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

`HTMLMetaElement.charset`

The character encoding for a HTML document.

`HTMLMetaElement.content`

The 'value' part of the name-value pairs of the document metadata.

`HTMLMetaElement.httpEquiv`

The name of the pragma directive, the HTTP response header, for a document.

`HTMLMetaElement.media`

The media context for a `theme-color` metadata property.

`HTMLMetaElement.name`

The 'name' part of the name-value pairs defining the named metadata of a document.

`HTMLMetaElement.scheme` 
Deprecated

 Defines the scheme of the value in the `HTMLMetaElement.content` attribute.
 This is deprecated and should not be used on new web pages.


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

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

Examples
--------

 The following two examples show a general approach to using the `HTMLMetaElement` interface.
 For specific examples, see the pages for the individual properties as described in the Instance properties section above.

### Setting the page description metadata

 The following example creates a new `<meta>` element with a `name` attribute set to `description`.
 The `content` attribute sets a description of the document and is appended to the document `<head>`:


```js
let meta = document.createElement("meta");
meta.name = "description";
meta.content =
  "The <meta> element can be used to provide document metadata in terms of name-value pairs, with the name attribute giving the metadata name, and the content attribute giving the value.";
document.head.appendChild(meta);
```

### Setting the viewport metadata

 The following example shows how to create a new `<meta>` element with a `name` attribute set to `viewport`.
 The `content` attribute sets the viewport size and is appended to the document `<head>`:


```js
var meta = document.createElement("meta");
meta.name = "viewport";
meta.content = "width=device-width, initial-scale=1";
document.head.appendChild(meta);
```


For more information on setting the viewport, see Viewport basics.

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

| Specification |
| --- |
| HTML Standard # htmlmetaelement |

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: `<meta>`
CSSConditionRule
================

An object implementing the **`CSSConditionRule`** interface represents a single condition CSS at-rule, which consists of a condition and a statement block.

Three objects derive from `CSSConditionRule`: `CSSMediaRule`, `CSSContainerRule` and `CSSSupportsRule`.

CSSRule

CSSGroupingRule

CSSConditionRuleInstance properties
-------------------

*Inherits properties from its ancestors `CSSRule` and `CSSGroupingRule`.*

`CSSConditionRule.conditionText`

Represents the text of the condition of the rule.

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

No specific methods; inherits methods from its ancestors `CSSRule` and `CSSGroupingRule`.

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

| Specification |
| --- |
| CSS Conditional Rules Module Level 3 # the-cssconditionrule-interface |

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

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

See also
--------

* Using dynamic styling information
SVGEvent
========

**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 `SVGEvent` interface represents the event object for most SVG-related events.

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

| Property | Type | Description |
| --- | --- | --- |
| `target` Read only  | `EventTarget` | The event target (the topmost target in the DOM tree). |
| `type` Read only  | string | The type of event. |
| `bubbles` Read only  | A boolean value | Whether the event normally bubbles or not. |
| `cancelable` Read only  | A boolean value | Whether the event is cancellable or not. |
MIDIOutputMap
=============

The **`MIDIOutputMap`** read-only interface of the Web MIDI API provides the set of MIDI output ports that are currently available.

A `MIDIOutputMap` instance is a read-only `Map`-like object, in which each key is the ID string for MIDI output, and the associated value is the corresponding `MIDIOutput` object.

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

| Specification |
| --- |
| Web MIDI API # midiinputmap-interface |

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

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

 The **`Crypto`** interface represents basic cryptography features available in the current context.
 It allows access to a cryptographically strong random number generator and to cryptographic primitives.

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

The Web Crypto API is accessed through the global `crypto` property, which is a `Crypto` object.

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

*This interface implements properties defined on `RandomSource`.*

`Crypto.subtle` Read only  Secure context

Returns a `SubtleCrypto` object providing access to common cryptographic primitives, like hashing, signing, encryption, or decryption.

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

*This interface implements methods defined on `RandomSource`.*

`Crypto.getRandomValues()`

Fills the passed `TypedArray` with cryptographically sound random values.

`Crypto.randomUUID()` Secure context

Returns a randomly generated, 36 character long v4 UUID.

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

 You should avoid using the Web Crypto API on insecure contexts, even though the `Crypto` interface is present on insecure contexts, as is the `crypto` property.
 In addition, the `Crypto` method `getRandomValues()` is available on insecure contexts, but the `subtle` property is not.

In general, you probably should just treat `Crypto` as available only on secure contexts.

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

| Specification |
| --- |
| Web Cryptography API # crypto-interface |

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

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

See also
--------

* Web security
* Secure contexts
* Features restricted to secure contexts
* Transport Layer Security
* Strict-Transport-Security