recursal/MDN huggingface dataset:
NetworkInformation
==================

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

 The **`NetworkInformation`** interface of the Network Information API provides information about the connection a device is using to communicate with the network and provides a means for scripts to be notified if the connection type changes.
 The `NetworkInformation` interface cannot be instantiated. It is instead accessed through the `connection` property of the `Navigator` interface.

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

EventTarget

NetworkInformationInstance properties
-------------------

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

`NetworkInformation.downlink` Read only  
Experimental

Returns the effective bandwidth estimate in megabits per second, rounded to the nearest multiple of 25 kilobits per seconds.

`NetworkInformation.downlinkMax` Read only  
Experimental

Returns the maximum downlink speed, in megabits per second (Mbps), for the underlying connection technology.

`NetworkInformation.effectiveType` Read only  
Experimental

Returns the effective type of the connection meaning one of 'slow-2g', '2g', '3g', or '4g'. This value is determined using a combination of recently observed round-trip time and downlink values.

`NetworkInformation.rtt` Read only  
Experimental

Returns the estimated effective round-trip time of the current connection, rounded to the nearest multiple of 25 milliseconds.

`NetworkInformation.saveData` Read only  
Experimental

Returns `true` if the user has set a reduced data usage option on the user agent.

`NetworkInformation.type` Read only  
Experimental

Returns the type of connection a device is using to communicate with the network. It will be one of the following values:

* `bluetooth`
* `cellular`
* `ethernet`
* `none`
* `wifi`
* `wimax`
* `other`
* `unknown`

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

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

Events
------

`change` 
Experimental

The event that's fired when connection information changes.

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

| Specification |
| --- |
| Network Information API # networkinformation-interface |

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

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

See also
--------

* Online and offline events
TaskSignal
==========

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
The **`TaskSignal`** interface of the Prioritized Task Scheduling API represents a signal object that allows you to communicate with a prioritized task, and abort it or change the priority (if required) via a `TaskController` object.

 An object of this type is created, and associated with, a `TaskController`.
 The initial priority of the signal may be set by specifying it as an argument to the `TaskController()` constructor (by default it is `"user-visible"`).
 The priority can be changed by calling `TaskController.setPriority()` on the controller.

 The signal may be passed as the `options.signal` argument in `Scheduler.postTask()`, after which it's associated controller can be used to abort the task.
 If the task priority is mutable, the controller can also be used to change the task's priority.
 Abortable tasks that do not need the priority to change may instead specify an `AbortSignal` as the `options.signal` argument.

EventTarget

AbortSignal

TaskSignalInstance properties
-------------------

*The `TaskSignal` interface also inherits properties from its parent interface, `AbortSignal`.*

`TaskSignal.priority` Read only 

Returns the priority of the signal.

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

*The `TaskSignal` interface inherits methods from its parent interface, `AbortSignal`.*

`TaskSignal.any()` 
Experimental

Returns an **`TaskSignal`** that aborts when any of the given abort signals abort.

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

*The `TaskSignal` interface inherits methods from its parent interface, `AbortSignal`.*

Events
------

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

`prioritychange`

 Fired when the priority is changed.
 This is triggered by calling `TaskController.setPriority()` on the associated controller.


Examples
--------

Examples for how the `TaskSignal` is created and used for prioritizing and aborting tasks can be found here:

* Prioritized Task Scheduling API > Examples
* `TaskController` > Examples
* `TaskSignal: prioritychange` event > Examples
Specifications
--------------

| Specification |
| --- |
| Prioritized Task Scheduling # tasksignal |

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

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

The **`PushManager`** interface of the Push API provides a way to receive notifications from third-party servers as well as request URLs for push notifications.

This interface is accessed via the `ServiceWorkerRegistration.pushManager` property.

Static properties
-----------------

`PushManager.supportedContentEncodings`

Returns an array of supported content codings that can be used to encrypt the payload of a push message.

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

`PushManager.getSubscription()`

Retrieves an existing push subscription. It returns a `Promise` that resolves to a `PushSubscription` object containing details of an existing subscription. If no existing subscription exists, this resolves to a `null` value.

`PushManager.permissionState()`

Returns a `Promise` that resolves to the permission state of the current `PushManager`, which will be one of `'granted'`, `'denied'`, or `'prompt'`.

`PushManager.subscribe()`

Subscribes to a push service. It returns a `Promise` that resolves to a `PushSubscription` object containing details of a push subscription. A new push subscription is created if the current service worker does not have an existing subscription.

### Deprecated methods

`PushManager.hasPermission()` 
Deprecated

Returns a `Promise` that resolves to the `PushPermissionStatus` of the requesting webapp, which will be one of `granted`, `denied`, or `default`. Replaced by `PushManager.permissionState()`.

`PushManager.register()` 
Deprecated

Subscribes to a push subscription. Replaced by `PushManager.subscribe()`.

`PushManager.registrations()` 
Deprecated

Retrieves existing push subscriptions. Replaced by `PushManager.getSubscription()`.

`PushManager.unregister()` 
Deprecated

Unregisters and deletes a specified subscription endpoint. In the updated API, a subscription is unregistered by calling the `PushSubscription.unsubscribe()` method.

Example
-------


```js
this.onpush = (event) => {
  console.log(event.data);
  // From here we can write the data to IndexedDB, send it to any open
  // windows, display a notification, etc.
};

navigator.serviceWorker
  .register("serviceworker.js")
  .then((serviceWorkerRegistration) => {
    serviceWorkerRegistration.pushManager.subscribe().then(
      (pushSubscription) => {
        console.log(pushSubscription.endpoint);
        // The push subscription details needed by the application
        // server are now available, and can be sent to it using,
        // for example, the fetch() API.
      },
      (error) => {
        console.error(error);
      },
    );
  });
```

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

| Specification |
| --- |
| Push API # pushmanager-interface |

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

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

See also
--------

* Push API
* Service Worker API
SVGMPathElement
===============

The **`SVGMPathElement`** interface corresponds to the `<mpath>` element.

EventTarget

Node

Element

SVGElement

SVGMPathElementInstance properties
-------------------

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

`SVGMPathElement.href` Read only 

An `SVGAnimatedString` that corresponds to the `href` or `xlink:href` 
Deprecated
 attribute of the given `<mpath>` element.

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

*This interface doesn't implement any specific methods, but inherits methods from its parent interface, `SVGElement`.*

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

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

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

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

The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data.

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

`CompressionStream()`

Creates a new `CompressionStream`

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

`CompressionStream.readable`

Returns the `ReadableStream` instance controlled by this object.

`CompressionStream.writable`

Returns the `WritableStream` instance controlled by this object.

Examples
--------

In this example a stream is compressed using gzip compression.


```js
const compressedReadableStream = inputReadableStream.pipeThrough(
  new CompressionStream("gzip"),
);
```

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

| Specification |
| --- |
| Compression Streams # compression-stream |

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

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

**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 **`SVGFontFaceElement`** interface corresponds to the `<font-face>` elements.

Object-oriented access to the attributes of the `<font-face>` element via the SVG DOM is not possible.

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

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

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

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

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

| Specification |
| --- |
| Scalable Vector Graphics (SVG) 1.1 (Second Edition) # InterfaceSVGFontFaceElement |

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

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

See also
--------

* `<font-face>`
DOMStringList
=============

The **`DOMStringList`** interface is a legacy type returned by some APIs and represents a non-modifiable list of strings (`DOMString`). Modern APIs use `Array` objects (in WebIDL: `sequence<DOMString>`) instead.

This interface is used in IndexedDB and in the `Location` API:

* `IDBDatabase.objectStoreNames`
* `IDBObjectStore.indexNames`
* `Location.ancestorOrigins`
Instance properties
-------------------

`DOMStringList.length` Read only 

Returns the size of the list.

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

`DOMStringList.item()`

Returns a string from the list with the given index.

`DOMStringList.contains()`

Returns a boolean indicating whether the given string is in the list.

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

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

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

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

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

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

 The **`MediaStreamTrackGenerator`** interface of the `Insertable Streams for MediaStreamTrack API` creates a `WritableStream` that acts as a `MediaStreamTrack` source.
 The object consumes a stream of media frames as input, which can be audio or video frames.

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

`MediaStreamTrackGenerator()` 
Experimental

Non-standard

Creates a new `MediaStreamTrackGenerator` object which accepts either `VideoFrame` or `AudioData` objects.

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

*This interface also inherits properties from `MediaStreamTrack`.*

`MediaStreamTrackGenerator.writable` 
Experimental

Non-standard

A `WritableStream`.

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

*This interface doesn't implement any specific methods, but inherits methods from `MediaStreamTrack`.*

Examples
--------

The following example is from the article Insertable streams for MediaStreamTrack, and demonstrates a barcode scanner application, which process barcodes and highlights them before writing the transformed frames to the writable stream of `MediaStreamTrackGenerator.writable`.


```js
const stream = await getUserMedia({ video: true });
const videoTrack = stream.getVideoTracks()[0];

const trackProcessor = new MediaStreamTrackProcessor({ track: videoTrack });
const trackGenerator = new MediaStreamTrackGenerator({ kind: "video" });

const transformer = new TransformStream({
  async transform(videoFrame, controller) {
    const barcodes = await detectBarcodes(videoFrame);
    const newFrame = highlightBarcodes(videoFrame, barcodes);
    videoFrame.close();
    controller.enqueue(newFrame);
  },
});

trackProcessor.readable
  .pipeThrough(transformer)
  .pipeTo(trackGenerator.writable);
```

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

#### No specification found

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

The `Client` interface represents an executable context such as a `Worker`, or a `SharedWorker`. `Window` clients are represented by the more-specific `WindowClient`. You can get `Client`/`WindowClient` objects from methods such as `Clients.matchAll()` and `Clients.get()`.

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

`Client.postMessage()`

Sends a message to the client.

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

`Client.frameType` Read only 

The client's frame type as a string. It can be `"auxiliary"`, `"top-level"`, `"nested"`, or `"none"`.

`Client.id` Read only 

The universally unique identifier of the client as a string.

`Client.type` Read only 

The client's type as a string. It can be `"window"`, `"worker"`, or `"sharedworker"`.

`Client.url` Read only 

The URL of the client as a string.

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

| Specification |
| --- |
| Service Workers # client-interface |

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

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

See also
--------

* Using Service Workers
MediaStreamTrackEvent
=====================

The **`MediaStreamTrackEvent`** interface of the Media Capture and Streams API represents events which indicate that a `MediaStream` has had tracks added to or removed from the stream through calls to Media Capture and Streams API methods. These events are sent to the stream when these changes occur.

Event

MediaStreamTrackEvent
The events based on this interface are `addtrack` and `removetrack`.

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

`MediaStreamTrackEvent()`

Constructs a new `MediaStreamTrackEvent` with the specified configuration.

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

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

`MediaStreamTrackEvent.track` Read only 

Returns a `MediaStreamTrack` object representing the track associated with the event.

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

*Also inherits methods from its parent interface, `Event`.*

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

| Specification |
| --- |
| Media Capture and Streams # mediastreamtrackevent |

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

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

See also
--------

* `MediaStream`: `addtrack` and `removetrack` events
* `MediaStreamTrack`
* Media Capture and Streams API
CSSRule
=======

The **`CSSRule`** interface represents a single CSS rule. There are several types of rules which inherit properties from `CSSRule`.

* `CSSGroupingRule`
* `CSSStyleRule`
* `CSSImportRule`
* `CSSMediaRule`
* `CSSFontFaceRule`
* `CSSPageRule`
* `CSSNamespaceRule`
* `CSSKeyframesRule`
* `CSSKeyframeRule`
* `CSSCounterStyleRule`
* `CSSSupportsRule`
* `CSSFontFeatureValuesRule`
* `CSSFontPaletteValuesRule`
* `CSSLayerBlockRule`
* `CSSLayerStatementRule`
* `CSSPropertyRule`
Instance properties
-------------------

The `CSSRule` interface specifies the properties common to all rules, while properties unique to specific rule types are specified in the more specialized interfaces for those rules' respective types.

`CSSRule.cssText`

Represents the textual representation of the rule, e.g. "`h1,h2 { font-size: 16pt }`" or "`@import 'url'`". To access or modify parts of the rule (e.g. the value of "font-size" in the example) use the properties on the specialized interface for the rule's type.

`CSSRule.parentRule` Read only 

Returns the containing rule, otherwise `null`. E.g. if this rule is a style rule inside an `@media` block, the parent rule would be that `CSSMediaRule`.

`CSSRule.parentStyleSheet` Read only 

Returns the `CSSStyleSheet` object for the style sheet that contains this rule

`CSSRule.type` Read only  
Deprecated

Returns one of the Type constants to determine which type of rule is represented.

Examples
--------

References to a `CSSRule` may be obtained by looking at a `CSSStyleSheet`'s `cssRules` list.


```js
let myRules = document.styleSheets[0].cssRules; // Returns a CSSRuleList
console.log(myRules);
```

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

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

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

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

See also
--------

* Using dynamic styling information
OES\_texture\_float extension
=============================

The **`OES_texture_float`** extension is part of the WebGL API and exposes floating-point pixel types for textures.

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

**Note:** This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default.

Extended methods
----------------

This extension extends `WebGLRenderingContext.texImage2D()` and `WebGLRenderingContext.texSubImage2D()`:

* The `type` parameter now accepts `gl.FLOAT`.
* The `pixels` parameter now accepts a `Float32Array`.
Limitation: Linear filtering
----------------------------

Linear filtering on floating-point textures is not allowed with this extension. If you set the magnification or minification filter in the `WebGLRenderingContext.texParameter()` method to one of `gl.LINEAR`, `gl.LINEAR_MIPMAP_NEAREST`, `gl.NEAREST_MIPMAP_LINEAR`, or `gl.LINEAR_MIPMAP_LINEAR`, and use floating-point textures, the texture will be marked as incomplete.

To use linear filtering on floating-point textures, enable the `OES_texture_float_linear` extension in addition to this extension.

Floating-point color buffers
----------------------------

This extension implicitly enables the `WEBGL_color_buffer_float` extension (if supported), which allows rendering to 32-bit floating-point color buffers.

Examples
--------


```js
const ext = gl.getExtension("OES\_texture\_float");

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

gl.texImage2D(gl.TEXTURE\_2D, 0, gl.RGBA, gl.RGBA, gl.FLOAT, image);
```

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

| Specification |
| --- |
| WebGL OES\_texture\_float Khronos Ratified Extension Specification  |

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

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

See also
--------

* `WebGLRenderingContext.getExtension()`
* `WebGLRenderingContext.texImage2D()`
* `WebGLRenderingContext.texSubImage2D()`
* `OES_texture_float_linear`
* `OES_texture_half_float`
* `OES_texture_half_float_linear`
Console API
===========

The Console API provides functionality to allow developers to perform debugging tasks, such as logging messages or the values of variables at set points in your code, or timing how long an operation takes to complete.

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

Concepts and usage
------------------

The Console API started as a largely proprietary API, with different browsers implementing it, albeit in inconsistent ways. The Console API spec was created to define consistent behavior, and all modern browsers eventually settled on implementing this behavior — although some implementations still have their own additional proprietary functions. Find out about these at:

* Google Chrome DevTools implementation
* Safari DevTools implementation

Usage is very simple — the `console` object contains many methods that you can call to perform rudimentary debugging tasks, generally focused around logging various values to the browser's Web Console.

By far the most commonly-used method is `console.log()`, which is used to log the current value contained inside a specific variable.

Interfaces
----------

`console`

Provides rudimentary debugging functionality, including logging, stack traces, timers, and counters.

Examples
--------


```js
let myString = "Hello world";

// Output "Hello world" to the console
console.log(myString);
```


See the console reference page for more examples.

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

| Specification |
| --- |
| Console Standard # console-namespace |

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

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

See also
--------

* Tools
* Web Console — how the Web Console in Firefox handles console API calls
* about:debugging — how to see console output when the debugging target is a mobile device
HTMLQuoteElement
================

The **`HTMLQuoteElement`** interface provides special properties and methods (beyond the regular `HTMLElement` interface it also has available to it by inheritance) for manipulating quoting elements, like `<blockquote>` and `<q>`, but not the `<cite>` element.

EventTarget

Node

Element

HTMLElement

HTMLQuoteElementInstance properties
-------------------

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

`HTMLQuoteElement.cite`

A string reflecting the `cite` HTML attribute, containing a URL for the source of the quotation.

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

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

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

| Specification |
| --- |
| HTML Standard # htmlquoteelement |

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

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

See also
--------

* The HTML elements implementing this interface: `<blockquote>` and `<q>`, but not `<cite>`.