recursal/MDN huggingface dataset:
RTCTransformEvent
=================

The **`RTCTransformEvent`** of the WebRTC API represent an event that is fired in a dedicated worker when an encoded frame has been queued for processing by a WebRTC Encoded Transform.

 The interface has a `transformer` property that exposes a readable stream and a writable stream.
 A worker should read encoded frames from `transformer.readable`, modify them as needed, and write them to `transformer.writable` in the same order and without any duplication.

At time of writing there is just one event based on `RTCTransformEvent`: `rtctransform`.

Event

RTCTransformEventInstance properties
-------------------

*Since `RTCTransformEvent` is based on `Event`, its properties are also available.*

`RTCTransformEvent.transformer` Read only 

Returns the `RTCRtpScriptTransformer` associated with the event.

Transform event types
---------------------

There is only one type of transform event.

### `rtctransform`

The `rtctransform` event is fired at the worker global scope on construction of an associated `RTCRtpScriptTransform`, and whenever a new encoded video or audio frame is enqueued for processing.

You can add a `rtctransform` event listener to be notified when the new frame is available using either `DedicatedWorkerGlobalScope.addEventListener()` or the `onrtctransform` event handler property.

Example
-------

This example creates an event listener for the `rtctransform` event.

 The example assumes we have a `TransformStream` with an `options` object passed from a `RTCRtpScriptTransform` constructor in the main-thread.
 The code at the end shows how the stream is piped through the transform stream from the `readable` to the `writable`.


```js
addEventListener("rtctransform", (event) => {
  let transform;
  // Select a transform based on passed options
  if (event.transformer.options.name == "senderTransform") {
    transform = createSenderTransform(); // A TransformStream (not shown)
  } else if (event.transformer.options.name == "receiverTransform") {
    transform = createReceiverTransform(); // A TransformStream (not shown)
  }
  // Pipe frames from the readable to writeable through TransformStream
  event.transformer.readable
    .pipeThrough(transform)
    .pipeTo(event.transformer.writable);
});
```


Note that this code is part of a more complete example provided in Using WebRTC Encoded Transforms.

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

| Specification |
| --- |
| WebRTC Encoded Transform # rtctransformevent |

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

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

* Using WebRTC Encoded Transforms
* `TransformStream`
CSSSkewY
========

The **`CSSSkewY`** interface of the CSS\_Object\_Model#css\_typed\_object\_model represents the `skewY()` value of the individual `transform` property in CSS. It inherits properties and methods from its parent `CSSTransformValue`.

CSSTransformComponent

CSSSkewYConstructor
-----------

`CSSSkewY()`

Creates a new `CSSSkewY` object.

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

*Inherits properties from its ancestor* `CSSTransformValue`.

`ay`

Returns or sets the y-axis value.

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

*Inherits methods from its ancestor* `CSSTransformValue`.

Examples
--------

To Do

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

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

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

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

**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 **`GestureEvent`** is a proprietary interface specific to WebKit which gives information regarding multi-touch gestures. Events using this interface include `gesturestart`, `gesturechange`, and `gestureend`.

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

*This interface also inherits properties of its parents, `UIEvent` and `Event`.*

`GestureEvent.rotation` Read only  
Non-standard

Change in rotation (in degrees) since the event's beginning. Positive values indicate clockwise rotation; negative values indicate counterclockwise rotation. Initial value: `0.0`.

`GestureEvent.scale` Read only  
Non-standard

Distance between two digits since the event's beginning. Expressed as a floating-point multiple of the initial distance between the digits at the beginning of the gesture. Values below 1.0 indicate an inward pinch (zoom out). Values above 1.0 indicate an outward unpinch (zoom in). Initial value: `1.0`.

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

*This interface also inherits methods of its parents, `UIEvent` and `Event`.*

`GestureEvent.initGestureEvent()` 
Non-standard

Initializes the value of an `GestureEvent`. If the event has already been dispatched, this method does nothing.

Gesture event types
-------------------

* `gesturestart`
* `gesturechange`
* `gestureend`
Specifications
--------------

*Not part of any specification.* Apple has a description at the Safari Developer Library.

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

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

The **`Worker`** interface of the Web Workers API represents a background task that can be created via script, which can send messages back to its creator.

Creating a worker is done by calling the `Worker("path/to/worker/script")` constructor.

Workers may themselves spawn new workers, as long as those workers are hosted at the same origin as the parent page.

Note that not all interfaces and functions are available to web workers. See Functions and classes available to Web Workers for details.

EventTarget

WorkerConstructors
------------

`Worker()`

Creates a dedicated web worker that executes the script at the specified URL. This also works for Blob URLs.

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

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

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

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

`Worker.postMessage()`

Sends a message — consisting of any JavaScript object — to the worker's inner scope.

`Worker.terminate()`

Immediately terminates the worker. This does not let worker finish its operations; it is halted at once. `ServiceWorker` instances do not support this method.

Events
------

`error`

Fires when an error occurs in the worker.

`message`

Fires when the worker's parent receives a message from that worker.

`messageerror`

Fires when a `Worker` object receives a message that can't be deserialized.

Example
-------

The following code snippet creates a `Worker` object using the `Worker()` constructor, then uses the worker object:


```js
const myWorker = new Worker("/worker.js");
const first = document.querySelector("input#number1");
const second = document.querySelector("input#number2");

first.onchange = () => {
  myWorker.postMessage([first.value, second.value]);
  console.log("Message posted to worker");
};
```


For a full example, see our Basic dedicated worker example (run dedicated worker).

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

| Specification |
| --- |
| HTML Standard # dedicated-workers-and-the-worker-interface |

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

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

Support varies for different types of workers. See each worker type's page for specifics.

### Cross-origin worker error behavior

In early versions of the spec, loading a cross-origin worker script threw a `SecurityError`. Nowadays, an `error` event is thrown instead.

See also
--------

* Using Web Workers
* Functions and classes available to Web Workers
* Other kind of workers: `SharedWorker` and Service Worker.
* `OffscreenCanvas` interface
RTCRtpReceiver
==============

The **`RTCRtpReceiver`** interface of the WebRTC API manages the reception and decoding of data for a `MediaStreamTrack` on an `RTCPeerConnection`.

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

`RTCRtpReceiver.track` Read only 

Returns the `MediaStreamTrack` associated with the current `RTCRtpReceiver` instance.

`RTCRtpReceiver.transport` Read only 

Returns the `RTCDtlsTransport` instance over which the media for the receiver's track is received.

`RTCRtpReceiver.transform`

An `RTCRtpScriptTransform` is used to insert a transform stream (`TransformStream`) running in a worker thread into the receiver pipeline, allowing stream transforms to be applied to incoming encoded video and audio frames.

### Obsolete properties

`rtcpTransport` 
Deprecated

This property has been removed; the RTP and RTCP transports have been combined into a single transport. Use the `transport` property instead.

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

`RTCRtpReceiver.getCapabilities()`

Returns the most optimistic view of the capabilities of the system for receiving media of the given kind.

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

`RTCRtpReceiver.getContributingSources()`

Returns an array that contains an object for each unique CSRC (contributing source) identifier received by the current `RTCRtpReceiver` in the last ten seconds.

`RTCRtpReceiver.getParameters()`

Returns an object that contains information about how the RTC data is to be decoded.

`RTCRtpReceiver.getStats()`

Returns a `Promise` whose fulfillment handler receives a `RTCStatsReport` which contains statistics about the incoming streams and their dependencies.

`RTCRtpReceiver.getSynchronizationSources()`

Returns an array that contains an object for each unique SSRC (synchronization source) identifier received by the current `RTCRtpReceiver` in the last ten seconds.

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

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # rtcrtpreceiver-interface |

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

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

See also
--------

* WebRTC
* `RTCStatsReport`
* `RTCRtpSender`
* `RTCPeerConnection.getStats()`
GPUBindGroup
============

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

The **`GPUBindGroup`** interface of the WebGPU API is based on a `GPUBindGroupLayout` and defines a set of resources to be bound together in a group and how those resources are used in shader stages.

A `GPUBindGroup` object instance is created using the `GPUDevice.createBindGroup()` method.

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

`label` 
Experimental

A string providing a label that can be used to identify the object, for example in `GPUError` messages or console warnings.

Examples
--------

**Note:** The WebGPU samples feature many more examples.

### Basic example

Our basic compute demo shows an example of creating a bind group layout and then using that as a template when creating a bind group.


```js
// ...

const bindGroupLayout = device.createBindGroupLayout({
  entries: [
    {
      binding: 0,
      visibility: GPUShaderStage.COMPUTE,
      buffer: {
        type: "storage",
      },
    },
  ],
});

const bindGroup = device.createBindGroup({
  layout: bindGroupLayout,
  entries: [
    {
      binding: 0,
      resource: {
        buffer: output,
      },
    },
  ],
});

// ...
```

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

| Specification |
| --- |
| WebGPU # gpubindgroup |

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

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

See also
--------

* The WebGPU API
CSSStartingStyleRule
====================

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

The **`CSSStartingStyleRule`** interface of the CSS Object Model represents a CSS `@starting-style` at-rule.

CSSRule

CSSGroupingRule

CSSStartingStyleRuleInstance properties
-------------------

*This interface inherits properties from its parent, `CSSGroupingRule`.*

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

*This interface inherits methods from its parent, `CSSGroupingRule`.*

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

| Specification |
| --- |
| CSS Transitions Level 2 # the-cssstartingstylerule-interface |

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

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

See also
--------

* `@starting-style`
* CSS transitions module
* Using dynamic styling information
InputEvent
==========

Baseline 2023
-------------

Newly availableSince March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

* Learn more
* See full compatibility
* Report feedback
The **`InputEvent`** interface represents an event notifying the user of editable content changes.

Event

UIEvent

InputEventConstructor
-----------

`InputEvent()`

Creates an `InputEvent` object.

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

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

`InputEvent.data` Read only 

Returns a string with the inserted characters. This may be an empty string if the change doesn't insert text (for example, when deleting characters).

`InputEvent.dataTransfer` Read only 

Returns a `DataTransfer` object containing information about richtext or plaintext data being added to or removed from editable content.

`InputEvent.inputType` Read only 

Returns the type of change for editable content such as, for example, inserting, deleting, or formatting text.

`InputEvent.isComposing` Read only 

Returns a `Boolean` value indicating if the event is fired after `compositionstart` and before `compositionend`.

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

*This interface inherits methods from its parents, `UIEvent` and `Event`.*

`InputEvent.getTargetRanges()`

Returns an array of static ranges that will be affected by a change to the DOM if the input event is not canceled.

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

| Specification |
| --- |
| Input Events Level 2 # interface-InputEvent |
| UI Events # interface-inputevent |

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

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

See also
--------

* `beforeinput` event
* `input` event
TrustedTypePolicyFactory
========================

The **`TrustedTypePolicyFactory`** interface of the `Trusted Types API` creates policies and allows the verification of Trusted Type objects against created policies.

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

`TrustedTypePolicyFactory.emptyHTML` Read only 

Returns a `TrustedHTML` object containing an empty string.

`TrustedTypePolicyFactory.emptyScript` Read only 

Returns a `TrustedScript` object containing an empty string.

`TrustedTypePolicyFactory.defaultPolicy` Read only 

Returns the default `TrustedTypePolicy` or null if this is empty.

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

`TrustedTypePolicyFactory.createPolicy()`

Creates a `TrustedTypePolicy` object that implements the rules passed as `policyOptions`.

`TrustedTypePolicyFactory.isHTML()`

When passed a value checks that it is a valid `TrustedHTML` object.

`TrustedTypePolicyFactory.isScript()`

When passed a value checks that it is a valid `TrustedScript` object.

`TrustedTypePolicyFactory.isScriptURL()`

When passed a value checks that it is a valid `TrustedScriptURL` object.

`TrustedTypePolicyFactory.getAttributeType()`

Allows web developers to check whether a Trusted Type is required for an element and attribute, and if so which one.

`TrustedTypePolicyFactory.getPropertyType()`

Allows web developers to check whether a Trusted Type is required for a property, and if so which one.

Examples
--------

The below code creates a policy with the name `"myEscapePolicy"` with a function defined for `createHTML()` which sanitizes HTML.

We then use the policy to sanitize a string, creating a `TrustedHTML` object, `escaped`. This object can be tested with `isHTML()` to ensure that it was created by one of our policies.


```js
const escapeHTMLPolicy = trustedTypes.createPolicy("myEscapePolicy", {
  createHTML: (string) => string.replace(/>/g, "<"),
});

const escaped = escapeHTMLPolicy.createHTML("<img src=x onerror=alert(1)>");

console.log(trustedTypes.isHTML(escaped)); // true;
```

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

| Specification |
| --- |
| Trusted Types # trusted-type-policy-factory |

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

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

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

The **`SharedStorage`** interface of the Shared Storage API represents the shared storage for a particular origin, defining methods to write data to the shared storage.

`SharedStorage` is the base class for:

* `WindowSharedStorage`, accessed via `Window.sharedStorage`.
* `WorkletSharedStorage`, accessed via `SharedStorageWorkletGlobalScope.sharedStorage`.
Instance methods
----------------

`append()` 
Experimental

Appends a string to the value of an existing key-value pair in the current origin's shared storage.

`clear()` 
Experimental

Clears the current origin's shared storage, removing all data from it.

`delete()` 
Experimental

Deletes an existing key-value pair from the current origin's shared storage.

`set()` 
Experimental

Stores a new key-value pair in the current origin's shared storage or updates an existing one.

Examples
--------


```js
window.sharedStorage
  .set("ab-testing-group", "0")
  .then(console.log("Value saved to shared storage"));
```

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

| Specification |
| --- |
| Shared Storage API # sharedstorage |

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

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

See also
--------

* `WindowSharedStorage`
* Shared Storage API
WebGLObject
===========

The **`WebGLObject`** is part of the WebGL API and is the parent interface for all WebGL objects.

This object has no public properties or methods on its own.

If the WebGL context is lost, the internal *invalidated* flag of all `WebGLObject` instances is set to `true`.

Objects inheriting from `WebGLObject`
-------------------------------------

WebGL 1:

* `WebGLBuffer`
* `WebGLFramebuffer`
* `WebGLProgram`
* `WebGLRenderbuffer`
* `WebGLShader`
* `WebGLTexture`

WebGL 2:

* `WebGLQuery` (and `WebGLTimerQueryEXT`)
* `WebGLSampler`
* `WebGLSync`
* `WebGLTransformFeedback`
* `WebGLVertexArrayObject` (and `WebGLVertexArrayObjectOES`)
See also
--------

* `WebGLRenderingContext.isContextLost()`
* `WEBGL_lose_context`
* `webglcontextlost` event
BluetoothDevice
===============

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

 The BluetoothDevice interface of the Web Bluetooth API represents a Bluetooth device inside a particular script execution
 environment.

EventTarget

BluetoothDeviceInstance properties
-------------------

`BluetoothDevice.id` 
Experimental
 Read only 

A string that uniquely identifies a device.

`BluetoothDevice.name` 
Experimental
 Read only 

A string that provides a human-readable name for the device.

`BluetoothDevice.gatt` 
Experimental
 Read only 

A reference to the device's `BluetoothRemoteGATTServer`.

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

`BluetoothDevice.watchAdvertisements()` 
Experimental

 A `Promise` that resolves to `undefined` or is rejected with
 an error if advertisements can't be shown for any reason.


`BluetoothDevice.forget()` 
Experimental

Provides a way for the page to revoke access to a device the user has granted access to.

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

| Specification |
| --- |
| Web Bluetooth # bluetoothdevice-interface |

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

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

The **`RTCCertificateStats`** dictionary of the WebRTC API is used to report information about a certificate used by an `RTCDtlsTransport` and its underlying `RTCIceTransport`.

The report can be obtained by iterating the `RTCStatsReport` returned by `RTCPeerConnection.getStats()` until you find an entry with the `type` of `certificate`.

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

`fingerprint`

A string containing the certificate fingerprint, which is calculated using the hash function specified in `fingerprintAlgorithm`.

`fingerprintAlgorithm`

A string containing the hash function used to compute the certificate `fingerprint`, such as "sha-256".

`base64Certificate`

A string containing the base-64 representation of the DER-encoded certificate.

### Common instance properties

The following properties are common to all WebRTC statistics objects (See `RTCStatsReport` for more information).

`id`

A string that uniquely identifies the object that is being monitored to produce this set of statistics.

`timestamp`

A `DOMHighResTimeStamp` object indicating the time at which the sample was taken for this statistics object.

`type`

A string with the value `"certificate"`, indicating the type of statistics that the object contains.

Examples
--------

 Given a variable `myPeerConnection`, which is an instance of `RTCPeerConnection`, the code below uses `await` to wait for the statistics report, and then iterates it using `RTCStatsReport.forEach()`.
 It then filters the dictionaries for just those reports that have the type of `certificate` and logs the result.


```js
const stats = await myPeerConnection.getStats();

stats.forEach((report) => {
  if (report.type === "certificate") {
    // Log the certificate information
    console.log(report);
  }
});
```

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

| Specification |
| --- |
| Identifiers for WebRTC's Statistics API # dom-rtcstatstype-certificate |

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

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

See also
--------

* `RTCStatsReport`
* `RTCCertificate`
SVGFontFaceSrcElement
=====================

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

Object-oriented access to the attributes of the `<font-face-src>` 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) # InterfaceSVGFontFaceSrcElement |

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

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

See also
--------

* `<font-face-src>`