recursal/MDN huggingface dataset:
OES\_draw\_buffers\_indexed: blendEquationiOES() method
=======================================================

The `blendEquationiOES()` method of the `OES_draw_buffers_indexed` WebGL extension sets both the RGB blend and alpha blend equations for a particular draw buffer.

See `OES_draw_buffers_indexed.blendEquationSeparateiOES()` for setting RGB and alpha separately and `WebGLRenderingContext.blendEquation()` for the WebGL 1 version of this method.

Syntax
------


```js
blendEquationiOES(buf, mode)
```

### Parameters

`buf`

An integer `i` specifying the draw buffer associated with the constant `gl.DRAW_BUFFERi`, see WebGL draw buffer constants.

`mode`

A `GLenum` specifying how source and destination colors are combined. Accepts the same enums as the `mode` parameter in `WebGLRenderingContext.blendEquation()`.

### Return value

None (`undefined`).

### Exceptions

* If `buf` is not a valid value, a `gl.INVALID_VALUE` error is thrown.
* If `mode` is not one of the possible values, a `gl.INVALID_ENUM` error is thrown.
Examples
--------

### Setting and getting blend equations

You can set the blend equations for the `gl.DRAW_BUFFER0` and `gl.DRAW_BUFFER1` draw buffers like this:


```js
const ext = gl.getExtension("OES\_draw\_buffers\_indexed");

ext.blendEquationiOES(0, gl.FUNC\_ADD);
ext.blendEquationiOES(1, gl.FUNC\_SUBTRACT);
```


To get the blend equations for the `gl.DRAW_BUFFER0` and `gl.DRAW_BUFFER1` draw buffers, query the `BLEND_EQUATION_RGB` and `BLEND_EQUATION_ALPHA` constants using `WebGL2RenderingContext.getIndexedParameter()`:


```js
// For gl.DRAW\_BUFFER0
gl.getIndexedParameter(gl.BLEND\_EQUATION\_RGB, 0);
gl.getIndexedParameter(gl.BLEND\_EQUATION\_ALPHA, 0);

// For gl.DRAW\_BUFFER0
gl.getIndexedParameter(gl.BLEND\_EQUATION\_RGB, 1);
gl.getIndexedParameter(gl.BLEND\_EQUATION\_ALPHA, 1);
```

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

| Specification |
| --- |
| WebGL OES\_draw\_buffers\_indexed Extension Specification  |

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

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

See also
--------

* `OES_draw_buffers_indexed.blendEquationSeparateiOES()`
* `WebGLRenderingContext.blendEquation()`
CountQueuingStrategy: size() method
===================================

 The **`size()`** method of the
 `CountQueuingStrategy` interface always returns `1`, so that the
 total queue size is a count of the number of chunks in the queue.

Syntax
------


```js
size()
```

### Parameters

None.

### Return value

`1`.

Examples
--------


```js
const queuingStrategy = new CountQueuingStrategy({ highWaterMark: 1 });

const writableStream = new WritableStream(
  {
    // Implement the sink
    write(chunk) {
      // …
    },
    close() {
      // …
    },
    abort(err) {
      console.log("Sink error:", err);
    },
  },
  queuingStrategy,
);

const size = queuingStrategy.size();
```

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

| Specification |
| --- |
| Streams Standard # ref-for-cqs-size② |

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

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

See also
--------

* `CountQueuingStrategy()` constructor
CountQueuingStrategy: highWaterMark property
============================================

The read-only **`CountQueuingStrategy.highWaterMark`** property returns the total number of chunks that can be contained in the internal queue before backpressure is applied.

Values
------

An integer representing a number of chunks.

Examples
--------


```js
const queueingStrategy = new CountQueuingStrategy({ highWaterMark: 1 });

const readableStream = new ReadableStream(
  {
    start(controller) {
      // …
    },
    pull(controller) {
      // …
    },
    cancel(err) {
      console.log("stream error:", err);
    },
  },
  queuingStrategy,
);

const size = queuingStrategy.size(chunk);
console.log(`highWaterMark value: ${queuingStrategy.highWaterMark}$`);
```

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

| Specification |
| --- |
| Streams Standard # ref-for-cqs-high-water-mark① |

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

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

See also
--------

* `CountQueuingStrategy()` constructor
CountQueuingStrategy: CountQueuingStrategy() constructor
========================================================

 The **`CountQueuingStrategy()`** constructor
 creates and returns a `CountQueuingStrategy` object instance.

Syntax
------


```js
new CountQueuingStrategy(highWaterMark)
```

### Parameters

An object with the following property:

`highWaterMark`

 The total number of chunks that can be contained in the internal
 queue before backpressure is applied.


### Return value

An instance of the `CountQueuingStrategy` object.

### Exceptions

None.

Examples
--------


```js
const queuingStrategy = new CountQueuingStrategy({ highWaterMark: 1 });

const writableStream = new WritableStream(
  {
    // Implement the sink
    write(chunk) {
      // …
    },
    close() {
      // …
    },
    abort(err) {
      console.log("Sink error:", err);
    },
  },
  queuingStrategy,
);

const size = queuingStrategy.size();
```

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

| Specification |
| --- |
| Streams Standard # ref-for-cqs-constructor① |

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

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

See also
--------

* `CountQueuingStrategy`
HTMLAnchorElement: pathname property
====================================

 The **`HTMLAnchorElement.pathname`** property is a
 string containing an initial `'/'` followed by the path of
 the URL not including the query string or fragment (or the empty string if there is no
 path).

Value
-----

A string.

Examples
--------


```js
// An <a id="myAnchor" href="/en-US/docs/HTMLAnchorElement"> element is in the document
const anchor = document.getElementById("myAnchor");
anchor.pathname; // returns '/en-US/docs/HTMLAnchorElement'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-pathname-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: origin property
==================================

 The
 **`HTMLAnchorElement.origin`** read-only property is a
 string containing the Unicode serialization of the origin of the
 represented URL.

That is:

* for URL using the `http` or `https`, the scheme followed by
 `'://'`, followed by the domain, followed by `':'`, followed by
 the port (the default port, `80` and `443` respectively, if
 explicitly specified);
* for URL using `file:` scheme, the value is browser dependent;
* for URL using the `blob:` scheme, the origin of the URL following
 `blob:`. E.g `"blob:https://mozilla.org"` will have
 `"https://mozilla.org".`
Value
-----

A string.

Examples
--------


```js
// An <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLAnchorElement"> element is in the document
const anchor = document.getElementById("myAnchor");
anchor.origin; // returns 'https://developer.mozilla.org'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-origin-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: toString() method
====================================

 The **`HTMLAnchorElement.toString()`** stringifier
 method returns a string containing the whole URL. It is a read-only
 version of `HTMLAnchorElement.href`.

Syntax
------


```js
toString()
```

### Parameters

None.

### Return value

A string containing the element's complete URL.

Examples
--------

### Calling toString on an anchor element


```js
// An <a id="myAnchor" href="/en-US/docs/HTMLAnchorElement"> element is in the document
const anchor = document.getElementById("myAnchor");
anchor.toString(); // returns 'https://developer.mozilla.org/en-US/docs/HTMLAnchorElement'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-href-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: relList property
===================================

The **`HTMLAnchorElement.relList`** read-only property reflects the `rel` attribute. It is a live `DOMTokenList` containing the set of link types indicating the relationship between the resource represented by the `<a>` element and the current document.

 The property itself is read-only, meaning you can't substitute the
 `DOMTokenList` with another one, but its contents can still be changed.

Value
-----

A live `DOMTokenList` of strings.

Examples
--------


```js
const anchors = document.getElementsByTagName("a");
for (const anchor of anchors) {
  const list = anchor.relList;
  console.log(
    `New anchor node found with ${list.length} link types in relList.`,
  );
  list.forEach((relValue) => {
    console.log(relValue);
  });
}
```

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

| Specification |
| --- |
| HTML Standard # dom-a-rellist |

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

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

See also
--------

* The equivalent property on `<area>` and `<link>`,
 `HTMLAreaElement.relList` and `HTMLLinkElement.relList`.
* The very same list but as a space-separated tokens in a string:
 `HTMLAnchorElement.rel`
HTMLAnchorElement: hash property
================================

 The
 **`HTMLAnchorElement.hash`** property returns a
 string containing a `'#'` followed by the fragment
 identifier of the URL.

 The fragment is URL encoded. If the URL does not
 have a fragment identifier, this property contains an empty string, `""`.

Value
-----

A string.

Examples
--------

### Getting the hash from an anchor link

Given this HTML


```html
<a id="myAnchor" href="/en-US/docs/HTMLAnchorElement#Examples">Examples</a>
```


you can get the hash of the anchor like this:


```js
const anchor = document.getElementById("myAnchor");
anchor.hash; // returns '#Examples'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-hash-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: protocol property
====================================

 The
 **`HTMLAnchorElement.protocol`**
 property is a string representing the protocol scheme of the URL,
 including the final `':'`.

Value
-----

A string.

Examples
--------

### Getting the protocol of an anchor link


```js
// An <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLAnchorElement"> element is in the document
const anchor = document.getElementById("myAnchor");
anchor.protocol; // returns 'https:'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-protocol-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: username property
====================================

 The **`HTMLAnchorElement.username`** property is a
 string containing the username specified before the domain name.

Value
-----

A string.

Examples
--------

### Getting the username from an anchor link


```js
// An <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLAnchorElement"> element is in the document
const anchor = document.getElementByID("myAnchor");
anchor.username; // returns 'anonymous'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-username-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: rel property
===============================

The **`HTMLAnchorElement.rel`** property reflects the `rel` attribute. It is a string containing a space-separated list of link types indicating the relationship between the resource represented by the `<a>` element and the current document.

Value
-----

A string.

Examples
--------


```js
const anchors = document.getElementsByTagName("a");
for (const anchor of anchors) {
  alert(`Rel: ${anchor.rel}`);
}
```

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

| Specification |
| --- |
| HTML Standard # dom-a-rel |

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

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

See also
--------

* The equivalent property on `<area>` and `<link>`,
 `HTMLAreaElement.rel` and `HTMLLinkElement.rel`.
* The very same list but as tokens: `HTMLAnchorElement.relList`
HTMLAnchorElement: target property
==================================

The **`target`** property of the `HTMLAnchorElement` interface is a string that indicates where to display the linked resource.

It reflects the `target` attribute of the `<a>` element.

Value
-----

A string representing the target. Its value can be:

* The name of a `<frame>`.
* One of the keyword with specific values:`_blank`, `_self`, `_parent`, or `_top`.
Example
-------


```html
<a href="www.example1.com" class="link1" target="\_blank">example1</a>
```



```js
const link = document.querySelector(".link1");
console.log(link.target); // output: "\_blank"
```

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

| Specification |
| --- |
| HTML Standard # dom-a-target |

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

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

See also
--------

* `HTMLBaseElement.target` property
* `HTMLFormElement.target` property
* `HTMLAreaElement.target` property
HTMLAnchorElement: hostname property
====================================

 The **`HTMLAnchorElement.hostname`** property is a
 string containing the domain of the URL.

Value
-----

A string.

Examples
--------


```js
// An <a id="myAnchor" href="/en-US/docs/HTMLAnchorElement"> element is in the document
const anchor = document.getElementById("myAnchor");
anchor.hostname; // returns 'developer.mozilla.org'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-hostname-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: hreflang property
====================================

The **`hreflang`** property of the `HTMLAnchorElement` interface is a string that is the language of the linked resource.

It reflects the `hreflang` attribute of the `<a>` element and is the empty string (`""`) if there is no `hreflang` element.

Web browsers and search engines may use this information to understand the language of the linked content better, but they are not required to follow it. The value provided for the `hreflang` attribute adheres to the format defined in RFC 5646: Tags for Identifying Languages (also known as BCP 47). If not, it is ignored.

Web browsers do not rely solely on the `hreflang` attribute after fetching the linked resource. Instead, they use language information directly associated with the resource (e.g., through HTTP headers) to determine its language.

Value
-----

A string that contains a language tag, or the empty string (`""`) if there is no `hreflang` element.

Example
-------


```html
<a id="exampleLink" href="https://example.com" hreflang="en-IN">Example Link</a>
<p class="hreflang"></p>
```



```css
#exampleLink {
  font-size: 1.5rem;
}
```



```js
const anchorElement = document.getElementById("exampleLink");
const pTag = document.querySelector(".hreflang");
console.log(anchorElement.hreflang); // Outputs: "en-IN"
pTag.textContent = anchorElement.hreflang;
```

Result
------

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

| Specification |
| --- |
| HTML Standard # dom-a-hreflang |

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

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

See also
--------

* `HTMLLinkElement.hreflang` property
HTMLAnchorElement: href property
================================

 The **`HTMLAnchorElement.href`** property is a
 stringifier that returns a string containing the whole URL, and allows
 the href to be updated.

Value
-----

A string.

Examples
--------


```js
// An <a id="myAnchor" href="https://developer.mozilla.org/en-US/HTMLAnchorElement"> element is in the document
const anchor = document.getElementById("myAnchor");
anchor.href; // returns 'https://developer.mozilla.org/en-US/HTMLAnchorElement'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-href-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: search property
==================================

 The **`HTMLAnchorElement.search`** property 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
 `URLSearchParams`
 and
 `URL.searchParams`
 to make it easy to parse out the parameters from the querystring.

Value
-----

A string.

Examples
--------

### Getting the search string from an anchor link


```js
// An <a id="myAnchor" href="/en-US/docs/HTMLAnchorElement?q=123"> element is in the document
const anchor = document.getElementById("myAnchor");
anchor.search; // returns '?q=123'
```

### Advanced parsing using URLSearchParams

Alternatively, `URLSearchParams` can be used:


```js
let params = new URLSearchParams(queryString);
let q = parseInt(params.get("q")); // returns the number 123
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-search-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: password property
====================================

 The **`HTMLAnchorElement.password`** property is a
 string containing the password specified before the domain name.

 If it is set without first setting the
 `username`
 property, it silently fails.

Value
-----

A string.

Examples
--------


```js
// An <a id="myAnchor" href="https://anonymous:flabada@developer.mozilla.org/en-US/docs/HTMLAnchorElement"> is in the document
const anchor = document.getElementByID("myAnchor");
anchor.password; // returns 'flabada'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-password-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: host property
================================

 The **`HTMLAnchorElement.host`** property is a
 string containing the host, that is the *hostname*, and then,
 if the *port* of the URL is nonempty, a `':'`, and the *port*
 of the URL.

Value
-----

A string.

Examples
--------


```js
const anchor = document.createElement("a");

anchor.href = "https://developer.mozilla.org/en-US/HTMLAnchorElement";
anchor.host === "developer.mozilla.org";

anchor.href = "https://developer.mozilla.org:443/en-US/HTMLAnchorElement";
anchor.host === "developer.mozilla.org";
// The port number is not included because 443 is the scheme's default port

anchor.href = "https://developer.mozilla.org:4097/en-US/HTMLAnchorElement";
anchor.host === "developer.mozilla.org:4097";
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-host-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.
HTMLAnchorElement: download property
====================================

 The **`HTMLAnchorElement.download`** property is a
 string indicating that the linked resource is intended to be
 downloaded rather than displayed in the browser. The value, if any, specifies the
 default file name for use in labeling the resource in a local file system. If the name
 is not a valid file name in the underlying OS, the browser will adjust it.


**Note:** This value might not be used for download. This value cannot
 be used to determine whether the download will occur.


Value
-----

A string.

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

| Specification |
| --- |
| HTML Standard # dom-a-download |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
HTMLAnchorElement: port property
================================

 The **`HTMLAnchorElement.port`** property is a
 string containing the port number of the URL. If the URL does not
 contain an explicit port number, it will be set to `''`.

Value
-----

A string.

Examples
--------

### Getting the port from an anchor link


```js
// An <a id="myAnchor" href="https://developer.mozilla.org:443/en-US/docs/HTMLAnchorElement"> element is in the document
const anchor = document.getElementByID("myAnchor");
anchor.port; // returns '443'
```

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

| Specification |
| --- |
| HTML Standard # dom-hyperlink-port-dev |

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

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

See also
--------

* The `HTMLAnchorElement` interface it belongs to.