recursal/MDN huggingface dataset:
SharedStorageWorkletGlobalScope
===============================

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

The **`SharedStorageWorkletGlobalScope`** interface of the Shared Storage API represents the global scope of a `SharedStorageWorklet` module.

WorkletGlobalScope

SharedStorageWorkletGlobalScopeInstance properties
-------------------

`sharedStorage` 
Experimental

Contains an instance of the `WorkletSharedStorage` object, representing the shared storage for a particular origin as exposed in a worklet context.

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

`register()` 
Experimental

Registers an operation defined inside the current worklet module.

Examples
--------


```js
// ab-testing-worklet.js
class SelectURLOperation {
  async run(urls, data) {
    // Read the user's experiment group from shared storage
    const experimentGroup = await this.sharedStorage.get("ab-testing-group");

    // Return the group number
    return experimentGroup;
  }
}

register("ab-testing", SelectURLOperation);
```


See the Shared Storage API landing page for a walkthrough of this example and links to other examples.

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

| Specification |
| --- |
| Shared Storage API # sharedstorageworkletglobalscope |

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

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

See also
--------

* Shared Storage API
SVGSymbolElement
================

The **`SVGSymbolElement`** interface corresponds to the `<symbol>` element.

EventTarget

Node

Element

SVGElement

SVGGraphicsElement

SVGSymbolElementInstance properties
-------------------

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

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

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

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

| Specification |
| --- |
| Scalable Vector Graphics (SVG) 2 # InterfaceSVGSymbolElement |

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

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

The **`WorkerLocation`** interface defines the absolute location of the script executed by the `Worker`. Such an object is initialized for each worker and is available via the `WorkerGlobalScope.location` property obtained by calling `self.location`.

This interface is only visible from inside a JavaScript script executed in the context of a Web worker.

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

`WorkerLocation.href` Read only 

Returns a string containing the serialized `URL` for the worker's location.

`WorkerLocation.protocol` Read only 

Returns the `protocol` part of the worker's location.

`WorkerLocation.host` Read only 

Returns the `host` part of the worker's location.

`WorkerLocation.hostname` Read only 

Returns the `hostname` part of the worker's location.

`WorkerLocation.origin` Read only 

Returns the worker's `origin`.

`WorkerLocation.port` Read only 

Returns the `port` part of the worker's location.

`WorkerLocation.pathname` Read only 

Returns the `pathname` part of the worker's location.

`WorkerLocation.search` Read only 

Returns the `search` part of the worker's location.

`WorkerLocation.hash` Read only 

Returns the `hash` part of the worker's location.

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

`WorkerLocation.toString()`

Returns a string containing the serialized `URL` for the worker's location. It is a synonym for `WorkerLocation.href`.

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

| Specification |
| --- |
| HTML Standard # worker-locations |

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

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

See also
--------

* Other Worker-related interfaces: `Worker`, `WorkerNavigator`, and `WorkerGlobalScope`
* Using web workers
RsaHashedImportParams
=====================

The **`RsaHashedImportParams`** dictionary of the Web Crypto API represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()` or `SubtleCrypto.unwrapKey()`, when importing any RSA-based key pair: that is, when the algorithm is identified as any of RSASSA-PKCS1-v1\_5, RSA-PSS, or RSA-OAEP.

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

`name`

A string. This should be set to `RSASSA-PKCS1-v1_5`, `RSA-PSS`, or `RSA-OAEP`, depending on the algorithm you want to use.

`hash`

A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.

**Warning:** Although you can technically pass `SHA-1` here, this is strongly discouraged as it is considered vulnerable.

Examples
--------

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

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

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

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

Browsers that support any RSA-based algorithm for the `SubtleCrypto.importKey()` or `SubtleCrypto.unwrapKey()` methods will support this type.

See also
--------

* `SubtleCrypto.importKey()`.
* `SubtleCrypto.unwrapKey()`.
HMDVRDevice
===========

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

**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 **`HMDVRDevice`** interface of the WebVR API represents a head mounted display, providing access to information about each eye, and allowing us to modify the current field of view.

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

`HMDVRDevice.getEyeParameters()` 
Deprecated

Non-standard

Returns current parameters for the eye specified as its argument ("left" or "right") — such as field of view information — stored in a `VREyeParameters` object.

`HMDVRDevice.setFieldOfView()` 
Deprecated

Non-standard

Sets the field of view for both eyes.

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

*This interface doesn't define any properties of its own, but it does inherit the properties of its parent interface, `VRDisplay`.*

`VRDisplay.hardwareUnitId` Read only 

Returns the distinct hardware ID for the overall hardware unit that this `VRDevice` is a part of. All devices that are part of the same physical piece of hardware will have the same `hardwareUnitId`.

`VRDisplay.displayId` Read only 

Returns the ID for this specific `VRDevice`. The ID shouldn't change across browser restarts, allowing configuration data to be saved based on it.

`VRDisplay.displayName` Read only 

A human-readable name to identify the `VRDevice`.

Examples
--------

The following example, taken from the WebVR spec, finds the first available `HMDVRDevice` and its associated `PositionSensorVRDevice`, if it has one.


```js
navigator.getVRDevices().then((devices) => {
  for (const device of devices) {
    if (device instanceof HMDVRDevice) {
      gHMD = device;
      break;
    }
  }

  if (gHMD) {
    for (const device of devices) {
      if (
        device instanceof PositionSensorVRDevice &&
        device.hardwareUnitId === gHMD.hardwareUnitId
      ) {
        gPositionSensor = devices[i];
        break;
      }
    }
  }
});
```

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

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

See also
--------

* WebVR API
CSS
===

The **`CSS`** interface holds useful CSS-related methods. No objects with this interface are implemented: it contains only static methods and is therefore a utilitarian interface.

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

`CSS.highlights`

Provides access to the `HighlightRegistry` used to style arbitrary text ranges using the CSS Custom Highlight API.

`CSS.paintWorklet` 
Experimental
 Secure context

Provides access to the Worklet responsible for all the classes related to painting.

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

*The CSS interface is a utility interface and no object of this type can be created: only static properties are defined on it.*

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

*No inherited static methods*.

`CSS.registerProperty()`

Registers `custom properties`, allowing for property type checking, default values, and properties that do or do not inherit their value.

`CSS.supports()`

Returns a boolean value indicating if the pair *property-value*, or the condition, given in parameter is supported.

`CSS.escape()`

Can be used to escape a string mostly for use as part of a CSS selector.

`CSS factory functions`

Can be used to return a new `CSSUnitValue` with a value of the parameter number of the units of the name of the factory function method used.


```js
CSS.em(3); // CSSUnitValue {value: 3, unit: "em"}
```


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

*The CSS interface is a utility interface and no object of this type can be created: only static methods are defined on it.*

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

| Specification |
| --- |
| CSS Object Model (CSSOM) # namespacedef-css |
| CSS Properties and Values API Level 1  |

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

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

**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 **`CookieStoreManager`** interface of the Cookie Store API allows service workers to subscribe to cookie change events. Call `subscribe()` on a particular service worker registration to receive change events.

A `CookieStoreManager` has an associated `ServiceWorkerRegistration`. Each service worker registration has a cookie change subscription list, which is a list of cookie change subscriptions each containing a name and URL. The methods in this interface allow the service worker to add and remove subscriptions from this list, and to get a list of all subscriptions.

To get a `CookieStoreManager`, call `ServiceWorkerRegistration.cookies`.

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

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

`CookieStoreManager.getSubscriptions()` 
Experimental

Returns a `Promise` which resolves to a list of the cookie change subscriptions for this service worker registration.

`CookieStoreManager.subscribe()` 
Experimental

Subscribes to changes to cookies. It returns a `Promise` which resolves when the subscription is successful.

`CookieStoreManager.unsubscribe()` 
Experimental

Unsubscribes the registered service worker from changes to cookies. It returns a `Promise` which resolves when the operation is successful.

Examples
--------

In this example, the `ServiceWorkerRegistration` represented by `registration` is subscribing to change events on the cookie named `"cookie1"` with a scope of `"/path1"`.


```js
const subscriptions = [{ name: "cookie1", url: `/path1` }];
await registration.cookies.subscribe(subscriptions);
```


If the `ServiceWorkerRegistration` has subscribed to any cookies, then `getSubscriptions()` will return a list of cookies represented by objects in the same format as used for the original subscription.


```js
const subscriptions = await self.registration.cookies.getSubscriptions();
```

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

| Specification |
| --- |
| Cookie Store API # cookiestoremanager |

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

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

The **`HTMLUnknownElement`** interface represents an invalid HTML element and derives from the `HTMLElement` interface, but without implementing any additional properties or methods.

EventTarget

Node

Element

HTMLElement

HTMLUnknownElementInstance properties
-------------------

*No specific property; inherits properties from its parent, `HTMLElement`.*

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

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

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

| Specification |
| --- |
| HTML Standard # htmlunknownelement |

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

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

The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the `fetch()`, `XMLHttpRequest.send()` or `navigator.sendBeacon()` methods. It uses the same format a form would use if the encoding type were set to `"multipart/form-data"`.

You can also pass it directly to the `URLSearchParams` constructor if you want to generate query parameters in the way a `<form>` would do if it were using simple `GET` submission.

An object implementing `FormData` can directly be used in a `for...of` structure, instead of `entries()`: `for (const p of myFormData)` is equivalent to `for (const p of myFormData.entries())`.

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

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

`FormData()`

Creates a new `FormData` object.

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

`FormData.append()`

Appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.

`FormData.delete()`

Deletes a key/value pair from a `FormData` object.

`FormData.entries()`

Returns an iterator that iterates through all key/value pairs contained in the `FormData`.

`FormData.get()`

Returns the first value associated with a given key from within a `FormData` object.

`FormData.getAll()`

Returns an array of all the values associated with a given key from within a `FormData`.

`FormData.has()`

Returns whether a `FormData` object contains a certain key.

`FormData.keys()`

Returns an iterator iterates through all keys of the key/value pairs contained in the `FormData`.

`FormData.set()`

Sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.

`FormData.values()`

Returns an iterator that iterates through all values contained in the `FormData`.

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

| Specification |
| --- |
| XMLHttpRequest Standard # interface-formdata |

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

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

See also
--------

* Using FormData objects
* `<form>`
XRHitTestSource
===============

**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 **`XRHitTestSource`** interface of the WebXR Device API handles hit test subscriptions. You can get an `XRHitTestSource` object by using the `XRSession.requestHitTestSource()` method.

This object doesn't itself contain hit test results, but it is used to compute hit tests for each `XRFrame` by calling `XRFrame.getHitTestResults()`, which returns `XRHitTestResult` objects.

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

None.

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

`XRHitTestSource.cancel()` 
Experimental

Unsubscribes from the hit test.

Examples
--------

### Getting an `XRHitTestSource` object for a session

Call `XRSession.requestHitTestSource()` to get a hit test source.


```js
const xrSession = navigator.xr.requestSession("immersive-ar", {
  requiredFeatures: ["local", "hit-test"],
});

let hitTestSource = null;

xrSession
  .requestHitTestSource({
    space: viewerSpace, // obtained from xrSession.requestReferenceSpace("viewer");
    offsetRay: new XRRay({ y: 0.5 }),
  })
  .then((viewerHitTestSource) => {
    hitTestSource = viewerHitTestSource;
  });

// frame loop
function onXRFrame(time, xrFrame) {
  let hitTestResults = xrFrame.getHitTestResults(hitTestSource);

  // do things with the hit test results
}
```

### Unsubscribe from hit test

To unsubscribe from a hit test source, call `XRHitTestSource.cancel()`. Since the object will no longer be usable, you can clean up and set the `XRHitTestSource` object to `null`.


```js
hitTestSource.cancel();
hitTestSource = null;
```

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

| Specification |
| --- |
| WebXR Hit Test Module # hit-test-source-interface |

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

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

See also
--------

* `XRTransientInputHitTestSource`
MediaKeyMessageEvent
====================

The **`MediaKeyMessageEvent`** interface of the Encrypted Media Extensions API contains the content and related data when the content decryption module generates a message for the session.

Event

MediaKeyMessageEventConstructor
-----------

`MediaKeyMessageEvent()`

Creates a new instance of `MediaKeyMessageEvent`.

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

Inherits properties from its parent, `Event`.

`MediaKeyMessageEvent.message` Read only 

Returns an `ArrayBuffer` with a message from the content decryption module. Messages vary by key system.

`MediaKeyMessageEvent.messageType` Read only 

Indicates the type of message. May be one of `license-request`, `license-renewal`, `license-release`, or `individualization-request`.

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

Inherits methods from its parent, `Event`.

Examples
--------


```js
// TBD
```

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

| Specification |
| --- |
| Encrypted Media Extensions # mediakeymessageevent |

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

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

The **`SVGForeignObjectElement`** interface provides access to the properties of `<foreignObject>` elements, as well as methods to manipulate them.

EventTarget

Node

Element

SVGElement

SVGGraphicsElement

SVGForeignObjectElementInstance properties
-------------------

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

`SVGForeignObjectElement.x` Read only 

An `SVGAnimatedLength` corresponding to the `x` attribute of the given `<foreignObject>` element.

`SVGForeignObjectElement.y` Read only 

An `SVGAnimatedLength` corresponding to the `x` attribute of the given `<foreignObject>` element.

`SVGForeignObjectElement.width` Read only 

An `SVGAnimatedLength` corresponding to the `width` attribute of the given `<foreignObject>` element.

`SVGForeignObjectElement.height` Read only 

An `SVGAnimatedLength` corresponding to the `height` attribute of the given `<foreignObject>` element.

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

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

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

| Specification |
| --- |
| Scalable Vector Graphics (SVG) 2 # InterfaceSVGForeignObjectElement |

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

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

See also
--------

* `<foreignObject>`
WEBGL\_compressed\_texture\_s3tc extension
==========================================

The **`WEBGL_compressed_texture_s3tc`** extension is part of the WebGL API and exposes four S3TC compressed texture formats.

Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution 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 available to both, WebGL1 and WebGL2 contexts.

Constants
---------

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

`ext.COMPRESSED_RGB_S3TC_DXT1_EXT`

A DXT1-compressed image in an RGB image format.

`ext.COMPRESSED_RGBA_S3TC_DXT1_EXT`

A DXT1-compressed image in an RGB image format with a simple on/off alpha value.

`ext.COMPRESSED_RGBA_S3TC_DXT3_EXT`

A DXT3-compressed image in an RGBA image format. Compared to a 32-bit RGBA texture, it offers 4:1 compression.

`ext.COMPRESSED_RGBA_S3TC_DXT5_EXT`

A DXT5-compressed image in an RGBA image format. It also provides a 4:1 compression, but differs to the DXT3 compression in how the alpha compression is done.

Examples
--------


```js
const ext =
  gl.getExtension("WEBGL\_compressed\_texture\_s3tc") ||
  gl.getExtension("MOZ\_WEBGL\_compressed\_texture\_s3tc") ||
  gl.getExtension("WEBKIT\_WEBGL\_compressed\_texture\_s3tc");

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

gl.compressedTexImage2D(
  gl.TEXTURE\_2D,
  0,
  ext.COMPRESSED\_RGBA\_S3TC\_DXT5\_EXT,
  512,
  512,
  0,
  textureData,
);

gl.texParameteri(gl.TEXTURE\_2D, gl.TEXTURE\_MAG\_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE\_2D, gl.TEXTURE\_MIN\_FILTER, gl.LINEAR);
```

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

| Specification |
| --- |
| WebGL WEBGL\_compressed\_texture\_s3tc Khronos Ratified Extension Specification  |

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

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

See also
--------

* S3 Texture Compression – OpenGL wiki
* `WebGLRenderingContext.getExtension()`
* `WebGLRenderingContext.compressedTexImage2D()`
* `WebGLRenderingContext.compressedTexSubImage2D()`
* `WebGLRenderingContext.getParameter()`
BluetoothRemoteGATTService
==========================

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

 The `BluetoothRemoteGATTService` interface of the Web Bluetooth API represents a
 service provided by a GATT server, including a device, a list of referenced services,
 and a list of the characteristics of this service.

EventTarget

BluetoothRemoteGATTServiceInstance properties
-------------------

`BluetoothRemoteGATTService.device` Read only  
Experimental

 Returns information about a Bluetooth device through an instance of
 `BluetoothDevice`.


`BluetoothRemoteGATTService.isPrimary` Read only  
Experimental

 Returns a boolean value indicating whether this is a primary or secondary
 service.


`BluetoothRemoteGATTService.uuid` Read only  
Experimental

Returns a string representing the UUID of this service.

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

`BluetoothRemoteGATTService.getCharacteristic()` 
Experimental

 Returns a `Promise` to an instance of
 `BluetoothRemoteGATTCharacteristic` for a given universally unique identifier
 (UUID).


`BluetoothRemoteGATTService.getCharacteristics()` 
Experimental

 Returns a `Promise` to an `Array` of
 `BluetoothRemoteGATTCharacteristic` instances for an optional universally
 unique identifier (UUID).


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

| Specification |
| --- |
| Web Bluetooth # bluetoothgattservice-interface |

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

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