recursal/MDN huggingface dataset:
GPUSampler
==========

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

The **`GPUSampler`** interface of the WebGPU API represents an object that can control how shaders transform and filter texture resource data.

A `GPUSampler` object instance is created using the `GPUDevice.createSampler()` 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
--------

The following snippet creates a `GPUSampler` that does trilinear filtering and repeats texture coordinates:


```js
// ...
const sampler = device.createSampler({
  addressModeU: "repeat",
  addressModeV: "repeat",
  magFilter: "linear",
  minFilter: "linear",
  mipmapFilter: "linear",
});
```


The WebGPU samples Shadow Mapping sample uses comparison samplers to sample from a depth texture to render shadows.

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

| Specification |
| --- |
| WebGPU # gpusampler |

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

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

See also
--------

* The WebGPU API
RTCPeerConnectionIceEvent
=========================

The **`RTCPeerConnectionIceEvent`** interface represents events that occur in relation to ICE candidates with the target, usually an `RTCPeerConnection`.

Only one event is of this type: `icecandidate`.

Event

RTCPeerConnectionIceEventInstance properties
-------------------

*A `RTCPeerConnectionIceEvent` being an `Event`, this event also implements these properties*.

`RTCPeerConnectionIceEvent.candidate` Read only 

Contains the `RTCIceCandidate` containing the candidate associated with the event, or `null` if this event indicates that there are no further candidates to come.

Constructors
------------

`RTCPeerConnectionIceEvent()`

Returns a new `RTCPeerConnectionIceEvent`. It takes two parameters, the first being a string representing the type of the event; the second a dictionary containing the `RTCIceCandidate` it refers to.

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

*A `RTCPeerConnectionIceEvent` being an `Event`, this event also implements these properties. There is no specific `RTCDataChannelEvent` method.*

Examples
--------


```js
pc.onicecandidate = (ev) => {
  console.log(
    `The ICE candidate (trsp addr: '${ev.candidate.candidate}') added to connection.`,
  );
};
```

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

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # rtcpeerconnectioniceevent |

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

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

See also
--------

* WebRTC
* Its usual target: `RTCPeerConnection`.
CSSLayerStatementRule
=====================

Baseline 2022
-------------

Newly availableSince March 2022, 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 **`CSSLayerStatementRule`** represents a `@layer` statement rule. Unlike `CSSLayerBlockRule`, it doesn't contain other rules and merely defines one or several layers by providing their names.

This rule allows to explicitly declare the ordering layer that is in an apparent way at the beginning of a CSS file: the layer order is defined by the order of first occurrence of each layer name. Declaring them with a statement allows the reader to understand the layer order. It also allows inline and imported layers to be interleaved, which is not possible when using the `CSSLayerBlockRule` syntax.

CSSRule

CSSLayerStatementRuleInstance properties
-------------------

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

* `CSSLayerStatementRule.nameList` Read only 
    + An array of strings, that represent the name of each cascade layer by the rule
Examples
--------

### HTML


```html
<p></p>
```

### CSS


```css
@layer layerName, layerName2;
```

### JavaScript


```js
const item = document.getElementsByTagName("p")[0];
const rules = document.styleSheets[1].cssRules;
// Note that stylesheet #1 is the stylesheet associated with this embedded example,
// while stylesheet #0 is the stylesheet associated with the whole MDN page

const layer = rules[0]; // A CSSLayerStatementRule

item.textContent = `The CSS @layer statement declares the following layers: ${layer.nameList.join(
 ", ",
)}.`;
```

### Result

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

| Specification |
| --- |
| CSS Cascading and Inheritance Level 5 # csslayerstatementrule |

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

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

See also
--------

* `@layer`
* The `@layer` statement at-rule for named layers
* `CSSLayerBlockRule`
HTMLSpanElement
===============

The **`HTMLSpanElement`** interface represents a `<span>` element and derives from the `HTMLElement` interface, but without implementing any additional properties or methods.

EventTarget

Node

Element

HTMLElement

HTMLSpanElementInstance properties
-------------------

*This interface has no properties, but inherits properties from: `HTMLElement`.*

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

*This interface has no methods, but inherits methods from: `HTMLElement`.*

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

| Specification |
| --- |
| HTML Standard # htmlspanelement |

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: `<span>`.
Plugin
======

**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 `Plugin` interface provides information about a browser plugin.

**Note:** Own properties of `Plugin` objects are no longer enumerable in the latest browser versions.

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

`Plugin.description` Read only  
Deprecated

A human-readable description of the plugin.

`Plugin.filename` Read only  
Deprecated

The filename of the plugin file.

`Plugin.name` Read only  
Deprecated

The name of the plugin.

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

`Plugin.item` 
Deprecated

Returns the MIME type of a supported content type, given the index number into a list of supported types.

`Plugin.namedItem` 
Deprecated

Returns the MIME type of a supported item.

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

| Specification |
| --- |
| HTML Standard # dom-plugin |

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

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

The **`AesKeyGenParams`** dictionary of the Web Crypto API represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.generateKey()`, when generating an AES key: that is, when the algorithm is identified as any of AES-CBC, AES-CTR, AES-GCM, or AES-KW.

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

`name`

A string. This should be set to `AES-CBC`, `AES-CTR`, `AES-GCM`, or `AES-KW`, depending on the algorithm you want to use.

`length`

A `Number` — the length in bits of the key to generate. This must be one of: 128, 192, or 256.

Examples
--------

See the examples for `SubtleCrypto.generateKey()`.

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

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

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

Browsers that support any of the AES-based algorithms for the `SubtleCrypto.generateKey()` method will support this type.

See also
--------

* `SubtleCrypto.generateKey()`.
PresentationConnection
======================

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

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

The **`PresentationConnection`** interface of the Presentation API provides methods and properties for managing a single presentation. Each presentation connection is represented by a `PresentationConnection` object. Both the controlling user agent and receiving user agent *MUST* implement `PresentationConnection`.

EventTarget

PresentationConnectionInstance properties
-------------------

`PresentationConnection.binaryType` 
Experimental

Returns either blob or arrayBuffer. When a `PresentationConnection` object is created, its `binaryType` IDL attribute *MUST* be set to the string " `arraybuffer`".

`PresentationConnection.id` Read only  
Experimental

Provides the presentation connection identifier.

`PresentationConnection.state` Read only  
Experimental

Returns the presentation connection's current state.

`PresentationConnection.url` Read only  
Experimental

Returns the URL used to create or reconnect to the presentation.

### Event handlers

`PresentationConnection.onclose` 
Experimental

Fired when there is a call to `PresentationConnection.close()`.

`PresentationConnection.onconnect` 
Experimental

Fired when a presentation connection is established.

`PresentationConnection.onmessage` 
Experimental

Fired when there is a call to `PresentationConnection.send()`.

`PresentationConnection.onterminated`

Fired when there is a call to `PresentationConnection.terminate()`.

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

`PresentationConnection.close()` 
Experimental

Closes the current connection and sends a `PresentationConnectionCloseEvent` to `PresentationConnection.onclosed`.

`PresentationConnection.send()` 
Experimental

Sends either binary or text data between a controlling browsing context and a presenting browsing context.

`PresentationConnection.terminate()` 
Experimental

Terminates the current connection and fires `PresentationConnection.onterminated`.

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

| Specification |
| --- |
| Presentation API # interface-presentationconnection |

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

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

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

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

 The **`Sanitizer`** interface of the `HTML Sanitizer API` is used to sanitize untrusted strings of HTML, `Document` and `DocumentFragment` objects.
 After sanitization, unwanted elements or attributes are removed, and the returned objects can safely be inserted into a document's DOM.

A **`Sanitizer`** object is also used by the `Element.setHTML()` method to parse and sanitize a string of HTML, and immediately insert it into an element.

 The default configuration strips out XSS-relevant input by default, including `<script>` tags, custom elements, and comments.
 This configuration may be customized using constructor options.

Constructors
------------

`Sanitizer()` 
Experimental

Creates and returns a `Sanitizer` object, optionally with custom sanitization behavior.

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

`Sanitizer.sanitize()` 
Experimental

Returns a sanitized `DocumentFragment` from an input `Document` or `DocumentFragment`

Examples
--------

For examples see the `HTML Sanitizer API` and the individual methods.

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

| Specification |
| --- |
| HTML Sanitizer API # sanitizer-api |

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

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

The **`CSSUnparsedValue`** interface of the CSS\_Object\_Model#css\_typed\_object\_model represents property values that reference custom properties. It consists of a list of string fragments and variable references.

Custom properties are represented by `CSSUnparsedValue` and `var()` references are represented using `CSSVariableReferenceValue`.

CSSStyleValue

CSSUnparsedValueConstructor
-----------

`CSSUnparsedValue()`

Creates a new `CSSUnparsedValue` object.

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

`CSSUnparsedValue.length`

Returns the number of items in the `CSSUnparsedValue` object.

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

`CSSUnparsedValue.entries()`

Returns an array of a given object's own enumerable property `[key, value]` pairs in the same order as that provided by a `for...in` loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).

`CSSUnparsedValue.forEach()`

Executes a provided function once for each element of the `CSSUnparsedValue` object.

`CSSUnparsedValue.keys()`

Returns a new *array iterator* object that contains the keys for each index in the `CSSUnparsedValue` object.

`CSSUnparsedValue.values()`

Returns a new *array iterator* object that contains the values for each index in the `CSSUnparsedValue` object.

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

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

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

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

See also
--------

* `CSSImageValue`
* `CSSKeywordValue`
* `CSSNumericValue`
* `CSSPositionValue`
* `CSSTransformValue`
* Using the CSS Typed OM
* CSS Typed Object Model API
EXT\_texture\_compression\_rgtc extension
=========================================

The `EXT_texture_compression_rgtc` extension is part of the WebGL API and exposes 4 RGTC compressed texture formats. RGTC is a block-based texture compression format suited for unsigned and signed red and red-green textures (**R**ed-**G**reen **T**exture **C**ompression).

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

**Note:** Support depends on the system's graphics driver. There is no support on Windows.

This extension is available to both, WebGL1 and WebGL2 contexts.

Constants
---------

The compressed texture formats are exposed by 4 constants and can be used in two functions: `compressedTexImage2D()` and `compressedTexSubImage2D()`.

`ext.COMPRESSED_RED_RGTC1_EXT`

Each 4x4 block of texels consists of 64 bits of unsigned red image data. See also BC4 unsigned.

`ext.COMPRESSED_SIGNED_RED_RGTC1_EXT`

Each 4x4 block of texels consists of 64 bits of signed red image data. See also BC4 signed.

`ext.COMPRESSED_RED_GREEN_RGTC2_EXT`

Each 4x4 block of texels consists of 64 bits of compressed unsigned red image data followed by 64 bits of compressed unsigned green image data. See also BC5 unsigned.

`ext.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT`

Each 4x4 block of texels consists of 64 bits of compressed signed red image data followed by 64 bits of compressed signed green image data. See also BC5 signed.

Examples
--------


```js
const ext = gl.getExtension("EXT\_texture\_compression\_rgtc");

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

gl.compressedTexImage2D(
  gl.TEXTURE\_2D,
  0,
  ext.COMPRESSED\_RED\_RGTC1\_EXT,
  128,
  128,
  0,
  textureData,
);
```

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

| Specification |
| --- |
| WebGL EXT\_texture\_compression\_rgtc Extension Specification  |

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

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

See also
--------

* `WebGLRenderingContext.getExtension()`
* `WebGLRenderingContext.compressedTexImage2D()`
* `WebGLRenderingContext.compressedTexSubImage2D()`
* `WebGLRenderingContext.getParameter()`
XRBoundedReferenceSpace
=======================

**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 WebXR Device API's **`XRBoundedReferenceSpace`** interface describes a virtual world reference space which has preset boundaries. This extends `XRReferenceSpace`, which describes an essentially unrestricted space around the viewer's position. These bounds are defined using an array of points, each of which defines a vertex in a polygon inside which the user is allowed to move.

This is typically used when the XR system is capable of tracking the user's physical movement within a limited distance of their starting position. The specified bounds may, in fact, describe the shape and size of the room the user is located in, in order to let the WebXR site or application prevent the user from colliding with the walls or other obstacles in the real world. At a minimum, the boundaries indicate the area in which the XR device is capable of tracking the user's movement. See the article Using bounded reference spaces for details on how bounded spaces work and why they're useful.

EventTarget

XRSpace

XRReferenceSpace

XRBoundedReferenceSpaceInstance properties
-------------------

*In addition to the properties of `XRReferenceSpace`, `XRBoundedReferenceSpace` includes the following:*

`boundsGeometry` Read only  
Experimental

An array of `DOMPointReadOnly` objects, each of which defines a vertex in the polygon defining the boundaries within which the user will be required to remain. These vertices *must* be sorted such that they move *clockwise* around the viewer's position.

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

*`XRBoundedReferenceSpace` inherits the methods of its parent interface, `XRReferenceSpace`. It has no further methods.*

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

| Specification |
| --- |
| WebXR Device API # xrboundedreferencespace-interface |

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

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

See also
--------

* WebXR Device API
* Geometry and reference spaces in WebXR
* Viewpoints and viewers: simulating cameras in WebXR
CryptoKey
=========

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

The **`CryptoKey`** interface of the Web Crypto API represents a cryptographic key obtained from one of the `SubtleCrypto` methods `generateKey()`, `deriveKey()`, `importKey()`, or `unwrapKey()`.

For security reasons, the `CryptoKey` interface can only be used in a secure context.

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

`CryptoKey.type` Read only 

The type of key the object represents. It may take one of the following values: `"secret"`, `"private"` or `"public"`.

`CryptoKey.extractable` Read only 

A boolean value indicating whether or not the key may be extracted using `SubtleCrypto.exportKey()` or `SubtleCrypto.wrapKey()`.

`CryptoKey.algorithm` Read only 

An object describing the algorithm for which this key can be used and any associated extra parameters.

`CryptoKey.usages` Read only 

An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `"encrypt"`, `"decrypt"`, `"sign"`, `"verify"`, `"deriveKey"`, `"deriveBits"`, `"wrapKey"`, and `"unwrapKey"`.

Examples
--------

The examples for `SubtleCrypto` methods often use `CryptoKey` objects. For example:

* `SubtleCrypto.generateKey()`
* `SubtleCrypto.deriveKey()`
* `SubtleCrypto.importKey()`
* `SubtleCrypto.exportKey()`
* `SubtleCrypto.wrapKey()`
* `SubtleCrypto.unwrapKey()`
* `SubtleCrypto.encrypt()`
* `SubtleCrypto.decrypt()`
* `SubtleCrypto.sign()`
* `SubtleCrypto.verify()`
Specifications
--------------

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

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

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

See also
--------

* Web Crypto API
* Web security
* Privacy, permissions, and information security
* `Crypto` and `Crypto.subtle`.
PushEvent
=========

The **`PushEvent`** interface of the Push API represents a push message that has been received. This event is sent to the global scope of a `ServiceWorker`. It contains the information sent from an application server to a `PushSubscription`.

Event

ExtendableEvent

PushEventConstructor
-----------

`PushEvent()`

Creates a new `PushEvent` object.

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

*Inherits properties from its parent, `ExtendableEvent`. Additional properties:*

`PushEvent.data` Read only 

Returns a reference to a `PushMessageData` object containing data sent to the `PushSubscription`.

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

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

Examples
--------

The following example takes data from a `PushEvent` and displays it on all of the service worker's clients.


```js
self.addEventListener("push", (event) => {
  if (!(self.Notification && self.Notification.permission === "granted")) {
    return;
  }

  const data = event.data?.json() ?? {};
  const title = data.title || "Something Has Happened";
  const message =
    data.message || "Here's something you might want to check out.";
  const icon = "images/new-notification.png";

  const notification = new self.Notification(title, {
    body: message,
    tag: "simple-push-demo-notification",
    icon,
  });

  notification.addEventListener("click", () => {
    clients.openWindow(
      "https://example.blog.com/2015/03/04/something-new.html",
    );
  });
});
```

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

| Specification |
| --- |
| Push API # pushevent-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
CSSNamespaceRule
================

The **`CSSNamespaceRule`** interface describes an object representing a single CSS `@namespace` at-rule.

CSSRule

CSSNamespaceRuleInstance properties
-------------------

*Inherits properties from its ancestor `CSSRule`.*

`CSSNamespaceRule.namespaceURI`

Returns a string containing the text of the URI of the given namespace.

`CSSNamespaceRule.prefix`

Returns a string with the name of the prefix associated to this namespace. If there is no such prefix, returns an empty string.

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

*Inherits methods from its ancestor `CSSRule`.*

Examples
--------

The stylesheet includes a namespace as the only rule. Therefore the first `CSSRule` returned will be a `CSSNamespaceRule`.


```css
@namespace url(http://www.w3.org/1999/xhtml);
```



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

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

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

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

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