recursal/MDN huggingface dataset:
WEBGL\_compressed\_texture\_s3tc\_srgb extension
================================================

The **`WEBGL_compressed_texture_s3tc_srgb`** extension is part of the WebGL API and exposes four S3TC compressed texture formats for the sRGB colorspace.

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_SRGB_S3TC_DXT1_EXT`

A DXT1-compressed image in an sRGB image format.

`ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT`

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

`ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT`

A DXT3-compressed image in an sRGBA image format.

`ext.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT`

A DXT5-compressed image in an sRGBA image format.

Examples
--------


```js
const ext = gl.getExtension("WEBGL\_compressed\_texture\_s3tc\_srgb");

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

gl.compressedTexImage2D(
  gl.TEXTURE\_2D,
  0,
  ext.COMPRESSED\_SRGB\_S3TC\_DXT1\_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\_srgb 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()`
SVGAnimatedNumberList
=====================

SVG animated number list interface
----------------------------------

The `SVGAnimatedNumber` interface is used for attributes which take a list of numbers and which can be animated.

### Interface overview

|  |  |
| --- | --- |
| Also implement | *None* |
| Methods | *None* |
| Properties | * readonly `SVGNumberList`
`baseVal`
* readonly `SVGNumberList`
`animVal`
 |
| Normative document | SVG 1.1 (2nd Edition) |

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

`SVGAnimatedNumberList.baseVal` Read only 

A `SVGNumberList` that represents the base value of the given attribute before applying any animations.

`SVGAnimatedNumberList.animVal` Read only 

A read only `SVGNumberList` that represents the current animated value of the given attribute. If the given attribute is not currently being animated, then the `SVGNumberList` will have the same contents as `baseVal`. The object referenced by `animVal` will always be distinct from the one referenced by `baseVal`, even when the attribute is not animated.

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

The `SVGAnimatedNumberList` interface do not provide any specific methods.

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

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

 The **`StorageEvent`** interface is implemented by the `storage` event, which is
 sent to a window
 when a storage area the window has access to is changed within the context of another document.

Event

StorageEventConstructor
-----------

`StorageEvent()`

Returns a newly constructed `StorageEvent` object.

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

*In addition to the properties listed below, this interface inherits the properties of its parent interface, `Event`.*

`key` Read only 

 Returns a string with the key for the storage item that was changed.
 The `key` attribute is `null` when the change is caused by the storage `clear()` method.


`newValue` Read only 

 Returns a string with the new value of the storage item that was changed.
 This value is `null` when the change has been invoked by storage `clear()` method,
 or the storage item has been removed from the storage.


`oldValue` Read only 

 Returns a string with the original value of the storage item that was changed.
 This value is `null` when the storage item has been newly added
 and therefore doesn't have any previous value.


`storageArea` Read only 

Returns a `Storage` object that represents the storage object that was affected.

`url` Read only 

Returns string with the URL of the document whose storage changed.

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

*In addition to the methods listed below, this interface inherits the methods of its parent interface, `Event`.*

`initStorageEvent()` 
Deprecated

Initializes the event in a manner analogous to the similarly-named `initEvent()` method in the DOM Events interfaces. Use the constructor instead.

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

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

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

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

See also
--------

* Web Storage API
XMLDocument
===========

The **XMLDocument** interface represents an XML document. It inherits from the generic `Document` and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents.

EventTarget

Node

Document

XMLDocumentProperty
--------

*Also inherits properties from: `Document`*.

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

*Also inherits methods from: `Document`*.

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

| Specification |
| --- |
| DOM Standard # xmldocument |

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

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

See also
--------

* The Document Object Model (DOM)
PromiseRejectionEvent
=====================

The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript `Promise`s are rejected. These events are particularly useful for telemetry and debugging purposes.

For details, see Promise rejection events.

Event

PromiseRejectionEventConstructor
-----------

`PromiseRejectionEvent()`

Creates a `PromiseRejectionEvent` event, given the type of event (`unhandledrejection` or `rejectionhandled`) and other details.

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

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

`PromiseRejectionEvent.promise` Read only 

The JavaScript `Promise` that was rejected.

`PromiseRejectionEvent.reason` Read only 

A value or `Object` indicating why the promise was rejected, as passed to `Promise.reject()`.

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

*This interface has no unique methods; inherits methods from its parent `Event`*.

Events
------

`rejectionhandled`

Fired when a JavaScript `Promise` is rejected, and after the rejection is handled by the promise's rejection handling code.

`unhandledrejection`

Fired when a JavaScript `Promise` is rejected but there is no rejection handler to deal with the rejection.

Examples
--------

This simple example catches unhandled promise rejections and logs them for debugging purposes.


```js
window.onunhandledrejection = (e) => {
  console.log(e.reason);
};
```

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

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

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

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

See also
--------

* Using promises
* `Promise`
* `rejectionhandled`
* `unhandledrejection`
XRCPUDepthInformation
=====================

**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 **`XRCPUDepthInformation`** interface contains depth information from the CPU (returned by `XRFrame.getDepthInformation()`).

XRDepthInformation

XRCPUDepthInformation
This interface inherits properties from its parent, `XRDepthInformation`.

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

`XRCPUDepthInformation.data` Read only  
Experimental

An `ArrayBuffer` containing depth-buffer information in raw format.

`XRDepthInformation.height` Read only 

Contains the height of the depth buffer (number of rows).

`XRDepthInformation.normDepthBufferFromNormView` Read only 

An `XRRigidTransform` that needs to be applied when indexing into the depth buffer. The transformation that the matrix represents changes the coordinate system from normalized view coordinates to normalized depth-buffer coordinates that can then be scaled by depth buffer's `width` and `height` to obtain the absolute depth-buffer coordinates.

`XRDepthInformation.rawValueToMeters` Read only 

Contains the scale factor by which the raw depth values must be multiplied in order to get the depths in meters.

`XRDepthInformation.width` Read only 

Contains the width of the depth buffer (number of columns).

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

`XRCPUDepthInformation.getDepthInMeters()` 
Experimental

Returns the depth in meters at (x, y) in normalized view coordinates.

Examples
--------

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

| Specification |
| --- |
| WebXR Depth Sensing Module # xr-cpu-depth-info-section |

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

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

See also
--------

* `XRDepthInformation`
* `XRWebGLDepthInformation`
* `XRFrame.getDepthInformation()`
TimeEvent
=========

The **`TimeEvent`** interface, a part of SVG SMIL animation, provides specific contextual information associated with Time events.

Event

TimeEventInstance properties
-------------------

`TimeEvent.detail` Read only 

A `long` that specifies some detail information about the Event, depending on the type of the event. For this event type, indicates the repeat number for the animation.

`TimeEvent.view` Read only 

A WindowProxy that identifies the Window from which the event was generated.

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

`TimeEvent.initTimeEvent()`

Used to initialize the value of a TimeEvent created through the DocumentEvent interface. This method may only be called before the TimeEvent has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary.
NDEFReader
==========

**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 **`NDEFReader`** interface of the Web NFC API is used to read from and write data to compatible NFC devices, e.g. NFC tags supporting NDEF, when these devices are within the reader's magnetic induction field.

EventTarget

NDEFReaderConstructor
-----------

`NDEFReader()` 
Experimental

Returns a new `NDEFReader` object.

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

*The `NDEFReader` interface inherits the methods of `EventTarget`, its parent interface.*

`NDEFReader.scan()` 
Experimental

Activates a reading device and returns a `Promise` that either resolves when an NFC tag read operation is scheduled or rejects if a hardware or permission error is encountered. This method triggers a permission prompt if the "nfc" permission has not been previously granted.

`NDEFReader.write()` 
Experimental

Attempts to write an NDEF message to a tag and returns a `Promise` that either resolves when a message has been written to the tag or rejects if a hardware or permission error is encountered. This method triggers a permission prompt if the "nfc" permission has not been previously granted.

Events
------

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

`reading` 
Experimental

Fires when a new reading is available from compatible NFC devices.

`readingerror` 
Experimental

Fires when a tag is in proximity of a reading device, but cannot be read.

Examples
--------

### Handling initial reads while writing

The example below shows how to coordinate between a common reading handler and one used specifically for a single write. In order to write, a tag needs to be found and read. This gives you the ability to check whether it is actually a tag that you want to write to. That's why it's recommended that you call `write()` from a reading event.


```js
const ndef = new NDEFReader();
let ignoreRead = false;

ndef.onreading = (event) => {
  if (ignoreRead) {
    return; // write pending, ignore read.
  }

  console.log("We read a tag, but not during pending write!");
};

function write(data) {
  ignoreRead = true;
  return new Promise((resolve, reject) => {
    ndef.addEventListener(
      "reading",
      (event) => {
        // Check if we want to write to this tag, or reject.
        ndef
          .write(data)
          .then(resolve, reject)
          .finally(() => (ignoreRead = false));
      },
      { once: true },
    );
  });
}

await ndef.scan();
try {
  await write("Hello World");
  console.log("We wrote to a tag!");
} catch (err) {
  console.error("Something went wrong", err);
}
```

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

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

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

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

The **`SVGFEFuncBElement`** interface corresponds to the `<feFuncB>` element.

EventTarget

Node

Element

SVGElement

SVGComponentTransferFunctionElement

SVGFEFuncBElementInstance properties
-------------------

*This interface not provide any specific properties, but inherits properties from its parent interface, `SVGComponentTransferFunctionElement`.*

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

*This interface does not provide any specific methods, but implements those of its parent, `SVGComponentTransferFunctionElement`.*

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

| Specification |
| --- |
| Filter Effects Module Level 1 # InterfaceSVGFEFuncBElement |

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

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

See also
--------

* `<feFuncB>`
GPUQueue
========

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

The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.

A device's primary queue is accessed via the `GPUDevice.queue` property.

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.

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

`copyExternalImageToTexture()` 
Experimental

Copies a snapshot taken from a source image, video, or canvas into a given `GPUTexture`.

`onSubmittedWorkDone()` 
Experimental

Returns a `Promise` that resolves when all the work submitted to the GPU via this `GPUQueue` at the point the method is called has been processed.

`submit()` 
Experimental

Schedules the execution of command buffers represented by one or more `GPUCommandBuffer` objects by the GPU.

`writeBuffer()` 
Experimental

Writes a provided data source into a given `GPUBuffer`.

`writeTexture()` 
Experimental

Writes a provided data source into a given `GPUTexture`.

Examples
--------

In our basic render demo, we define some vertex data in a `Float32Array` that we'll use to draw a triangle:


```js
const vertices = new Float32Array([
  0.0, 0.6, 0, 1, 1, 0, 0, 1, -0.5, -0.6, 0, 1, 0, 1, 0, 1, 0.5, -0.6, 0, 1, 0,
  0, 1, 1,
]);
```


To use this data in a render pipeline, we need to put it into a `GPUBuffer`. First we'll create the buffer:


```js
const vertexBuffer = device.createBuffer({
  size: vertices.byteLength, // make it big enough to store vertices in
  usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY\_DST,
});
```


To get the data into the buffer we can use the `writeBuffer()` function, which lets the user agent determine most efficient way to copy the data over:


```js
device.queue.writeBuffer(vertexBuffer, 0, vertices, 0, vertices.length);
```


Later on, a set of commands is encoded into a `GPUCommandBuffer` using the `GPUCommandEncoder.finish()` method. The command buffer is then passed into the queue via a `submit()` call, ready to be processed by the GPU.


```js
device.queue.submit([commandEncoder.finish()]);
```


**Note:** Study the WebGPU samples to find more queue examples.

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

| Specification |
| --- |
| WebGPU # gpu-queue |

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

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

See also
--------

* The WebGPU API
CSSSkew
=======

The **`CSSSkew`** interface of the CSS\_Object\_Model#css\_typed\_object\_model is part of the `CSSTransformValue` interface. It represents the `skew()` value of the individual `transform` property in CSS.

CSSTransformComponent

CSSSkewConstructor
-----------

`CSSSkew()`

Creates a new `CSSSkew` object.

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

`ax`

Returns or sets the x-axis value.

`ay`

Returns or sets the y-axis value.

Examples
--------

To Do

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

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

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

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

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

The WebXR Device API interface **`XRReferenceSpaceEvent`** represents an event sent to an `XRReferenceSpace`. Currently, the only event that uses this type is the `reset` event.

Event

XRReferenceSpaceEventConstructor
-----------

`XRReferenceSpaceEvent()`

Returns a new `XRReferenceSpaceEvent` with the specified type and configuration.

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

*In addition to inheriting the properties available on the parent interface, `Event`, `XRReferenceSpaceEvent` objects include the following properties:*

`referenceSpace` Read only 

An `XRReferenceSpace` indicating the reference space that generated the event.

`transform` Read only 

An `XRRigidTransform` object indicating the position and orientation of the specified `referenceSpace`'s native origin after the event, defined relative to the coordinate system before the event.

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

*While `XRReferenceSpaceEvent` does not define any methods, it inherits the methods of its parent interface, `Event`.*

Event types
-----------

`reset`

The `reset` event is sent to a reference space when its native origin is changed due to a discontinuity, recalibration, or device reset. This is an opportunity for your app to update any stored transforms, position/orientation information, or the like—or to dump any cached values based on the reference's space's origin so you can recompute them as needed.

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

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

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

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

The **`FocusEvent`** interface represents focus-related events, including `focus`, `blur`, `focusin`, and `focusout`.

Event

UIEvent

FocusEventConstructor
-----------

`FocusEvent()`

Creates a `FocusEvent` event with the given parameters.

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

*This interface also inherits properties from its parent `UIEvent`, and indirectly from `Event`*.

`FocusEvent.relatedTarget`

An `EventTarget` representing a secondary target for this event. In some cases (such as when tabbing in or out a page), this property may be set to `null` for security reasons.

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

*This interface has no specific methods. It inherits methods from its parent `UIEvent`, and indirectly from `Event`.*

Order of events
---------------

When focus is shifted from element A to element B, focus events are dispatched in the following order:

1. `blur`: sent after element A loses focus.
2. `focusout`: sent after the `blur` event.
3. `focus`: sent after element B receives focus.
4. `focusin`: sent after the `focus` event.
Specifications
--------------

| Specification |
| --- |
| UI Events # interface-focusevent |

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

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

See also
--------

* The `Event` base interface
SVGGElement
===========

The **`SVGGElement`** interface corresponds to the `<g>` element.

EventTarget

Node

Element

SVGElement

SVGGraphicsElement

SVGGElementInstance 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 # InterfaceSVGGElement |

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

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

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 global read-only **`scheduler`** property is the entry point for using the Prioritized Task Scheduling API.

 It is implemented by both `Window` and `WorkerGlobalScope`.
 The existence of the property indicates that the API is supported in the current context, and can be accessed using `this.scheduler`.

The object has a single instance method `Scheduler.postTask()` that is used to post prioritized tasks for scheduling.

Value
-----

A `Scheduler`.

Examples
--------

 The code below shows a very basic use of the property and its associated interface.
 It demonstrates how to check that the property exists and then posts a task that returns a promise.


```js
// Check if the prioritized task API is supported
if ("scheduler" in this) {
  // Callback function - "the task"
  const myTask = () => "Task 1: user-visible";

  // Post task with default priority: 'user-visible' (no other options)
  // When the task resolves, Promise.then() logs the result.
  scheduler
    .postTask(myTask)
    // Handle resolved value
    .then((taskResult) => console.log(`${taskResult}`))
    // Handle error or abort
    .catch((error) => console.log(`Error: ${error}`));
} else {
  console.log("Feature: NOT Supported");
}
```


For comprehensive example code showing to use the API see Prioritized Task Scheduling API > Examples.

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

| Specification |
| --- |
| Prioritized Task Scheduling # dom-windoworworkerglobalscope-scheduler |

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

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

See also
--------

* Prioritized Task Scheduling API
* `Scheduler.postTask()`
* `TaskController`