recursal/MDN huggingface dataset:
URL: search property
====================

 The **`search`** property of the `URL` interface
 is a search string, also called a *query string*, that is a
 string containing a `'?'` followed by the parameters of the
 URL.

 Modern browsers provide the `URL.searchParams` property to make it easy to
 parse out the parameters from the query string.

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

Value
-----

A string.

Examples
--------


```js
const url = new URL(
  "https://developer.mozilla.org/en-US/docs/Web/API/URL/search?q=123",
);
console.log(url.search); // Logs "?q=123"
```

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

| Specification |
| --- |
| URL Standard # dom-url-search |

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

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

See also
--------

* The `URL` interface it belongs to.
URL: searchParams property
==========================

 The **`searchParams`** read-only property of the
 `URL` interface returns a `URLSearchParams` object allowing
 access to the `GET` decoded query arguments contained in the URL.

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

Value
-----

A `URLSearchParams` object.

Examples
--------

 If the URL of your page is
 `https://example.com/?name=Jonathan%20Smith&age=18` you could parse out
 the `name` and `age` parameters using:


```js
let params = new URL(document.location).searchParams;
let name = params.get("name"); // is the string "Jonathan Smith".
let age = parseInt(params.get("age")); // is the number 18
```

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

| Specification |
| --- |
| URL Standard # dom-url-searchparams |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
WebGL2RenderingContext: resumeTransformFeedback() method
========================================================

 The **`WebGL2RenderingContext.resumeTransformFeedback()`**
 method of the WebGL 2 API resumes a
 transform feedback operation.

Syntax
------


```js
resumeTransformFeedback()
```

### Parameters

None.

### Return value

None (`undefined`).

Examples
--------


```js
const transformFeedback = gl.createTransformFeedback();
gl.bindTransformFeedback(gl.TRANSFORM\_FEEDBACK, transformFeedback);
gl.beginTransformFeedback(gl.TRIANGLES);
gl.pauseTransformFeedback();
//…
gl.resumeTransformFeedback();
gl.drawArrays(gl.TRIANGLES, 0, 3);
gl.endTransformFeedback();
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.15 |

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

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

See also
--------

* `WebGLTransformFeedback`
WebGL2RenderingContext: createVertexArray() method
==================================================

 The **`WebGL2RenderingContext.createVertexArray()`** method of
 the WebGL 2 API creates and initializes a
 `WebGLVertexArrayObject` object that represents a vertex array object (VAO)
 pointing to vertex array data and which provides names for different sets of vertex
 data.

Syntax
------


```js
createVertexArray()
```

### Parameters

None.

### Return value

 A `WebGLVertexArrayObject` representing a vertex array object (VAO) which
 points to vertex array data.

Examples
--------


```js
const vao = gl.createVertexArray();
gl.bindVertexArray(vao);

// …

// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO

// …
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.17 |

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

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

See also
--------

* `WebGLVertexArrayObject`
WebGL2RenderingContext: bindVertexArray() method
================================================

 The **`WebGL2RenderingContext.bindVertexArray()`** method of
 the WebGL 2 API binds a
 passed `WebGLVertexArrayObject` object to the buffer.

Syntax
------


```js
bindVertexArray(vertexArray)
```

### Parameters

`vertexArray`

A `WebGLVertexArrayObject` (VAO) object to bind.

### Return value

None (`undefined`).

Examples
--------


```js
const vao = gl.createVertexArray();
gl.bindVertexArray(vao);

// …

// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO

// …
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.17 |

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

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

See also
--------

* `WebGLVertexArrayObject`
WebGL2RenderingContext: getSamplerParameter() method
====================================================

 The **`WebGL2RenderingContext.getSamplerParameter()`** method
 of the WebGL 2 API returns parameter
 information of a `WebGLSampler` object.

Syntax
------


```js
getSamplerParameter(sampler, pname)
```

### Parameters

`sampler`

A `WebGLSampler` object.

`pname`

A `GLenum` specifying which information to return. Possible values:

* `gl.TEXTURE_COMPARE_FUNC`: Returns a `GLenum` indicating
 the texture comparison function.
* `gl.TEXTURE_COMPARE_MODE`: Returns a `GLenum` indicating
 the texture comparison mode.
* `gl.TEXTURE_MAG_FILTER`: Returns a `GLenum` indicating
 the texture magnification filter.
* `gl.TEXTURE_MAX_LOD`: Returns a `GLfloat` indicating the
 maximum level-of-detail value.
* `gl.TEXTURE_MIN_FILTER`: Returns a `GLenum` indicating
 the texture minification filter
* `gl.TEXTURE_MIN_LOD`: Returns a `GLfloat` indicating the
 minimum level-of-detail value.
* `gl.TEXTURE_WRAP_R`: Returns a `GLenum` indicating the
 texture wrapping function for the texture coordinate r.
* `gl.TEXTURE_WRAP_S`: Returns a `GLenum` indicating the
 texture wrapping function for the texture coordinate s.
* `gl.TEXTURE_WRAP_T`: Returns a `GLenum` indicating the
 texture wrapping function for the texture coordinate t.

### Return value

 Depends on the `pname` parameter, either a `GLenum` or a
 `GLfloat`.

Examples
--------


```js
const sampler = gl.createSampler();
gl.getSamplerParameter(sampler, gl.TEXTURE\_COMPARE\_FUNC);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.13 |

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

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

See also
--------

* `WebGLSampler`
WebGL2RenderingContext: clearBuffer[fiuv]() method
==================================================

 The **`WebGL2RenderingContext.clearBuffer[fiuv]()`** methods of
 the WebGL 2 API clear buffers from the
 currently bound framebuffer.

Syntax
------


```js
clearBufferfv(buffer, drawbuffer, values)
clearBufferfv(buffer, drawbuffer, values, srcOffset)

clearBufferiv(buffer, drawbuffer, values)
clearBufferiv(buffer, drawbuffer, values, srcOffset)

clearBufferuiv(buffer, drawbuffer, values)
clearBufferuiv(buffer, drawbuffer, values, srcOffset)

clearBufferfi(buffer, drawbuffer, depth, stencil)
```

### Parameters

`buffer`

A `GLenum` specifying the buffer to clear. Possible values are:

* `gl.COLOR`: Color buffer.
* `gl.DEPTH`: Depth buffer.
* `gl.STENCIL`: Stencil buffer.
* `gl.DEPTH_STENCIL`: clears depth and stencil buffers (used with
 `clearBufferfi`).

`drawBuffer`

A `GLint` specifying the draw buffer to clear.

`values`

 An `Array` of `GLint`, `GLuint`
 or `GLfloat` values or
 an `Int32Array`, `Uint32Array` or `Float32Array`
 specifying the values to clear to.


`depth`

A `GLfloat` specifying the value to clear a depth render buffer to.

`stencil`

A `GLint` specifying the value to clear the stencil render buffer to.

### Return value

None (`undefined`).

Examples
--------


```js
gl.clearBufferiv(gl.COLOR, 0, new Int32Array([r, g, b, a]));
gl.clearBufferuiv(gl.COLOR, 0, new Uint32Array([r, g, b, a]));
gl.clearBufferfv(gl.COLOR, 0, new Float32Array([r, g, b, a]));
gl.clearBufferfv(gl.COLOR, 0, [0.0, 0.0, 0.0, 0.0]);
gl.clearBufferfi(gl.DEPTH\_STENCIL, 0, 1.0, 0);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.11 |

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

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

See also
--------

* `WebGL2RenderingContext.drawBuffers()`
WebGL2RenderingContext: bindSampler() method
============================================

 The **`WebGL2RenderingContext.bindSampler()`** method of the WebGL 2 API binds a
 passed `WebGLSampler` object to the texture unit at the passed index.

Syntax
------


```js
bindSampler(unit, sampler)
```

### Parameters

`unit`

 A `GLuint` specifying the index of the texture unit to which to bind
 the sampler to.


`sampler`

A `WebGLSampler` object to bind.

### Return value

None (`undefined`).

Examples
--------


```js
const sampler = gl.createSampler();
gl.bindSampler(0, sampler);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.13 |

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

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

See also
--------

* `WebGLSampler`
WebGL2RenderingContext: drawBuffers() method
============================================

 The **`WebGL2RenderingContext.drawBuffers()`** method of the WebGL 2 API defines draw buffers to which
 fragment colors are written into. The draw buffer settings are part of the state of the
 currently bound framebuffer or the drawingbuffer if no framebuffer is bound.

Syntax
------


```js
drawBuffers(buffers)
```

### Parameters

`buffers`

 An `Array` of `GLenum` specifying the buffers into which
 fragment colors will be written. Possible values are:


`gl.NONE`

 Fragment shader output is not written into any color
 buffer.


`gl.BACK`

 Fragment shader output is written into the back color
 buffer.


`gl.COLOR_ATTACHMENT{0-15}`

 Fragment shader output is written in the
 nth color attachment of the current framebuffer.



### Return value

None (`undefined`).

### Exceptions

* If `buffers` contains not one of the accepted values, a
 `gl.INVALID_ENUM` error is thrown.
Examples
--------


```js
gl.drawBuffers([gl.NONE, gl.COLOR\_ATTACHMENT1]);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.11 |

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

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

See also
--------

* `WebGL2RenderingContext.clearBuffer[fiuv]()`
WebGL2RenderingContext: getBufferSubData() method
=================================================

 The **`WebGL2RenderingContext.getBufferSubData()`** method of
 the WebGL 2 API reads data from a buffer
 binding point and writes them to an `ArrayBuffer` or
 `SharedArrayBuffer`.

Syntax
------


```js
getBufferSubData(target, srcByteOffset, dstData)
getBufferSubData(target, srcByteOffset, dstData, dstOffset)
getBufferSubData(target, srcByteOffset, dstData, dstOffset, length)
```

### Parameters

`target`

A `GLenum` specifying the binding point (target). Possible values:

`gl.ARRAY_BUFFER`

 Buffer containing vertex attributes, such as
 vertex coordinates, texture coordinate data, or vertex color data.


`gl.ELEMENT_ARRAY_BUFFER`

Buffer used for element indices.

`gl.COPY_READ_BUFFER`

 Buffer for copying from one buffer object to
 another.


`gl.COPY_WRITE_BUFFER`

 Buffer for copying from one buffer object to
 another.


`gl.TRANSFORM_FEEDBACK_BUFFER`

 Buffer for transform feedback
 operations.


`gl.UNIFORM_BUFFER`

Buffer used for storing uniform blocks.

`gl.PIXEL_PACK_BUFFER`

Buffer used for pixel transfer operations.

`gl.PIXEL_UNPACK_BUFFER`

Buffer used for pixel transfer operations.


`srcByteOffset`

 A `GLintptr` specifying the byte offset from which to start reading
 from the buffer.


`dstData`

 A `TypedArray` or a `DataView` object to copy the data to. If `dstData` is a
 `DataView` then `dstOffset` and `length` are
 interpreted in bytes, otherwise `dstData`'s element type is used.


`dstOffset` Optional

 A `GLuint` specifying the element index offset to start writing in
 `dstData`.


`length` Optional

 A `GLuint` specifying the number of elements to copy. If this is 0 or
 not specified, `getBufferSubData` will copy until the end of
 `dstData`.


### Return value

None (`undefined`).

### Exceptions

An `INVALID_VALUE` error is generated if:

* `offset` + `returnedData.byteLength` would extend beyond the
 end of the buffer
* `returnedData` is `null`
* `offset` is less than zero.

An `INVALID_OPERATION` error is generated if:

* zero is bound to `target`
* `target` is `TRANSFORM_FEEDBACK_BUFFER`, and any transform
 feedback object is currently active.
Examples
--------


```js
const buffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY\_BUFFER, buffer);
gl.bufferData(gl.ARRAY\_BUFFER, new Float32Array(vertices), gl.STATIC\_DRAW);

const arrBuffer = new ArrayBuffer(
  vertices.length \* Float32Array.BYTES\_PER\_ELEMENT,
);
gl.getBufferSubData(gl.ARRAY\_BUFFER, 0, new Float32Array(arrBuffer));
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.3 |

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

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

See also
--------

* `WebGLRenderingContext.bufferData()`
* `WebGLRenderingContext.bufferSubData()`
* `WebGLRenderingContext.getBufferParameter()`
* `WebGL2RenderingContext.copyBufferSubData()`
WebGL2RenderingContext: getActiveUniformBlockName() method
==========================================================

 The **`WebGL2RenderingContext.getActiveUniformBlockName()`**
 method of the WebGL 2 API retrieves the name
 of the active uniform block at a given index within a `WebGLProgram`.

Syntax
------


```js
getActiveUniformBlockName(program, uniformBlockIndex)
```

### Parameters

`program`

A `WebGLProgram` containing the uniform block.

`uniformBlockIndex`

 A `GLuint` specifying the index of the uniform block to whose name to
 retrieve.


### Return value

A string indicating the active uniform block name.

Examples
--------


```js
const blockName = gl.getActiveUniformBlockName(program, 0);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.16 |

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

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

See also
--------

* `WebGL2RenderingContext.getUniformBlockIndex()`
WebGL2RenderingContext: createSampler() method
==============================================

 The **`WebGL2RenderingContext.createSampler()`** method of the
 WebGL 2 API creates and initializes
 `WebGLSampler` objects.

Syntax
------


```js
createSampler()
```

### Parameters

None.

### Return value

A `WebGLSampler` object.

Examples
--------

`gl` must be a `WebGL2RenderingContext`.
 `WebGLSampler` objects are not available in WebGL 1.


```js
const sampler = gl.createSampler();
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.13 |

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

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

See also
--------

* `WebGLSampler`
WebGL2RenderingContext: uniformMatrix[234]x[234]fv() method
===========================================================

 The **`WebGL2RenderingContext.uniformMatrix[234]x[234]fv()`**
 methods of the WebGL 2 API specify matrix
 values for uniform variables.


**Note:** There are no `2x2`, `3x3`, and `4x4` versions of
 this method. They are abbreviated in `2`, `3`, and
 `4`, respectively. See the syntax below.


Syntax
------


```js
uniformMatrix2fv(location, transpose, data)
uniformMatrix2fv(location, transpose, data, srcOffset)
uniformMatrix2fv(location, transpose, data, srcOffset, srcLength)

uniformMatrix3x2fv(location, transpose, data)
uniformMatrix3x2fv(location, transpose, data, srcOffset)
uniformMatrix3x2fv(location, transpose, data, srcOffset, srcLength)

uniformMatrix4x2fv(location, transpose, data)
uniformMatrix4x2fv(location, transpose, data, srcOffset)
uniformMatrix4x2fv(location, transpose, data, srcOffset, srcLength)

uniformMatrix2x3fv(location, transpose, data)
uniformMatrix2x3fv(location, transpose, data, srcOffset)
uniformMatrix2x3fv(location, transpose, data, srcOffset, srcLength)

uniformMatrix3fv(location, transpose, data)
uniformMatrix3fv(location, transpose, data, srcOffset)
uniformMatrix3fv(location, transpose, data, srcOffset, srcLength)

uniformMatrix4x3fv(location, transpose, data)
uniformMatrix4x3fv(location, transpose, data, srcOffset)
uniformMatrix4x3fv(location, transpose, data, srcOffset, srcLength)

uniformMatrix2x4fv(location, transpose, data)
uniformMatrix2x4fv(location, transpose, data, srcOffset)
uniformMatrix2x4fv(location, transpose, data, srcOffset, srcLength)

uniformMatrix3x4fv(location, transpose, data)
uniformMatrix3x4fv(location, transpose, data, srcOffset)
uniformMatrix3x4fv(location, transpose, data, srcOffset, srcLength)

uniformMatrix4fv(location, transpose, data)
uniformMatrix4fv(location, transpose, data, srcOffset)
uniformMatrix4fv(location, transpose, data, srcOffset, srcLength)
```

### Parameters

`location`

 A `WebGLUniformLocation` object containing the location of the uniform
 attribute to modify.


`transpose`

 A `GLboolean` specifying whether to transpose the matrix. Must be
 `false`.


`data`

A `Float32Array` of float values.

### Return value

None (`undefined`).

Examples
--------


```js
gl.uniformMatrix2x3fv(loc, false, [1, 2, 3, 4, 5, 6]);
```

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

| Specification |
| --- |
| WebGL Specification # 5.14.10 |

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

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

See also
--------

* `WebGLRenderingContext.uniformMatrix()`
WebGL2RenderingContext: bindBufferBase() method
===============================================

 The **`WebGL2RenderingContext.bindBufferBase()`** method of the
 WebGL 2 API binds a given
 `WebGLBuffer` to a given binding point (`target`) at a given
 `index`.

Syntax
------


```js
bindBufferBase(target, index, buffer)
```

### Parameters

`target`

 A `GLenum` specifying the target for the bind operation. Possible
 values:


* `gl.TRANSFORM_FEEDBACK_BUFFER`
* `gl.UNIFORM_BUFFER`

`index`

A `GLuint` specifying the index of the `target`.

`buffer`

 A `WebGLBuffer` which to bind to the binding point
 (`target`).


### Return value

None (`undefined`).

Examples
--------


```js
gl.bindBufferBase(gl.TRANSFORM\_FEEDBACK\_BUFFER, 0, buffer);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.16 |

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

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

See also
--------

* `WebGL2RenderingContext.getIndexedParameter()`
WebGL2RenderingContext: uniformBlockBinding() method
====================================================

 The **`WebGL2RenderingContext.uniformBlockBinding()`** method
 of the WebGL 2 API assigns binding points
 for active uniform blocks.

Syntax
------


```js
uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding)
```

### Parameters

`program`

 A `WebGLProgram` containing the active uniform block whose binding to
 assign.


`uniformBlockIndex`

 A `GLuint` specifying the index of the active uniform block within the
 program.


`uniformBlockBinding`

 A `GLuint` specifying the binding point to which to bind the uniform
 block.


### Return value

None (`undefined`).

Examples
--------


```js
gl.uniformBlockBinding(program, 0, 1);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.16 |

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

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

See also
--------

* `WebGL2RenderingContext.getUniformIndices()`
WebGL2RenderingContext: copyTexSubImage3D() method
==================================================

 The **`WebGL2RenderingContext.copyTexSubImage3D()`** method of
 the WebGL API copies pixels from the current
 `WebGLFramebuffer` into an existing 3D texture sub-image.

Syntax
------


```js
copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height)
```

### Parameters

`target`

 A `GLenum` specifying the binding point (target) of the active texture.
 Possible values:


* `gl.TEXTURE_3D`: A three-dimensional texture.
* `gl.TEXTURE_2D_ARRAY`: A two-dimensional array texture.

`level`

 A `GLint` specifying the level of detail. Level 0 is the base image
 level and level *n* is the n-th mipmap reduction level.


`xoffset`

A `GLint` specifying the x offset within the texture image.

`yoffset`

A `GLint` specifying the y offset within the texture image.

`zoffset`

A `GLint` specifying the z offset within the texture image.

`x`

 A `GLint` specifying the x coordinate of the lower left corner where to
 start copying.


`y`

 A `GLint` specifying the y coordinate of the lower left corner where to
 start copying.


`width`

A `GLsizei` specifying the width of the texture.

`height`

A `GLsizei` specifying the height of the texture.

### Return value

None (`undefined`).

Examples
--------


```js
gl.copyTexSubImage3D(gl.TEXTURE\_3D, 0, 0, 0, 0, 0, 0, 16, 16);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.6 |

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

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

See also
--------

* `WebGLRenderingContext.copyTexImage2D()`
* `WebGLRenderingContext.texImage2D()`
* `WebGLRenderingContext.texSubImage2D()`
* `WebGLRenderingContext.compressedTexImage2D()`
WebGL2RenderingContext: deleteQuery() method
============================================

 The **`WebGL2RenderingContext.deleteQuery()`** method of the WebGL 2 API deletes a given
 `WebGLQuery` object.

Syntax
------


```js
deleteQuery(query)
```

### Parameters

`query`

A `WebGLQuery` object to delete.

### Return value

None (`undefined`).

Examples
--------

`gl` must be a `WebGL2RenderingContext`.
 `WebGLQuery` objects are not available in WebGL 1.


```js
const query = gl.createQuery();

// …

gl.deleteQuery(query);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.12 |

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

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

See also
--------

* `WebGLQuery`
WebGL2RenderingContext: deleteSampler() method
==============================================

 The **`WebGL2RenderingContext.deleteSampler()`** method of the
 WebGL 2 API deletes a given
 `WebGLSampler` object.

Syntax
------


```js
deleteSampler(sampler)
```

### Parameters

`sampler`

A `WebGLSampler` object to delete.

### Return value

None (`undefined`).

Examples
--------

`gl` must be a `WebGL2RenderingContext`.
 `WebGLSampler` objects are not available in WebGL 1.


```js
const sampler = gl.createSampler();

// …

gl.deleteSampler(sampler);
```

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

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.13 |

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

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

See also
--------

* `WebGLSampler`