recursal/MDN huggingface dataset:
HTMLIFrameElement: loading property
===================================

The **`loading`** property of the `HTMLIFrameElement` interface is a string that provides a hint to the user agent indicating whether the iframe should be loaded immediately on page load, or only when it is needed.

 This can be used to optimize the loading of the document's contents.
 Iframes that are visible when the page loads can be downloaded immediately (eagerly), while iframes that are likely to be offscreen on initial page load can be downloaded lazily — just before they will appear in the window's visual viewport.

Value
-----

 A string providing a hint to the user agent as to how to best schedule the loading of the iframe.
 The possible values are:

`eager`

 Load the iframe as soon as the element is processed.
 This is the default.


`lazy`

Load the iframe when the browser believes that it is likely to be need in the near future.

Usage notes
-----------

### JavaScript must be enabled

Loading is only deferred when JavaScript is enabled, irrespective of the value of this property.

This is an anti-tracking measure, because if a user agent supported lazy loading when scripting is disabled, it would still be possible for a site to track a user's approximate scroll position throughout a session, by strategically placing iframes in a page's markup such that a server can track how many are requested and when.

### Timing of the load event

The `load` event is fired when the document has been fully processed.

 Lazily loaded iframes do not affect the timing of the `load` event even if the iframe is in the visual viewport and is therefore fetched on page load.
 All eagerly loaded iframes in the document must be fetched before the `load` event can fire.

Examples
--------

 The example below shows how you might define a lazy-loaded iframe and then append it to a `<div>` in the document.
 The frame would then only be loaded when the frame about to become visible.


```js
// Define iframe with lazy loading
const iframe = document.createElement("iframe");
iframe.src = "https://example.com";
iframe.width = 320;
iframe.height = 240;
iframe.loading = "lazy";

// Add to div element with class named frameDiv
const frameDiv = document.querySelector("div.frameDiv");
frameDiv.appendChild(iframe);
```

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

| Specification |
| --- |
| HTML Standard # dom-iframe-loading |

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

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

See also
--------

* The `<iframe>` element
* Web performance in the MDN Learning Area
* Lazy loading in the MDN web performance guide
* It's time to lazy-load offscreen iframes! on web.dev
URLPattern: pathname property
=============================

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

 The **`pathname`** read-only property of the `URLPattern` interface is a
 string containing the pattern used to match the pathname part
 of a URL. This value may differ from the input to the constructor due to
 normalization.

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

Value
-----

A string.

Examples
--------

 The below example creates a `URLPattern` object with
 `/books/:id(\\d)` for the `pathname` part. This pattern matches URLs starting
 with `/books/`, followed by an integer.


```js
const pattern = new URLPattern({ pathname: "/books/:id(\\d)" });
console.log(pattern.pathname); // '/books/:id(\\d)'
```

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

| Specification |
| --- |
| URL Pattern Standard # dom-urlpattern-pathname |

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

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

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

 The **`search`** read-only property of the `URLPattern` interface is a
 string containing the pattern used to match the search part of
 a URL. This value may differ from the input to the constructor due to
 normalization.

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

Value
-----

A string.

Examples
--------

 The below example creates a `URLPattern` object with `*` for the
 `search` part. This pattern is a wildcard, thus matching any search part.


```js
const pattern = new URLPattern("https://example.com?\*");
console.log(pattern.search); // '\*'
```

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

| Specification |
| --- |
| URL Pattern Standard # dom-urlpattern-search |

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

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

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

 The **`test()`** method of the `URLPattern` interface takes a URL or
 object of URL parts, and returns a boolean indicating if the given input matches
 the current pattern.

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

Syntax
------


```js
test(input)
test(input, baseURL)
```

### Parameters

`input`

 The URL or URL parts to match against. This can either be a
 string, or an object providing the individual URL parts.
 The object members can be any of `protocol`, `username`, `password`,
 `hostname`, `port`, `pathname`, `search`, `hash`, or `baseURL`. Omitted
 parts in the object will be treated as empty strings. If the input cannot be
 parsed, or a relative URL without a base is provided, the method will return
 `null`.


`baseURL` Optional

 A string representing the base URL to use in cases where
 `input` is a relative URL. If not specified, it defaults to `undefined`. If
 this parameter cannot be parsed, the method will return `false`.


### Return value

A `boolean`.

Examples
--------

 This example shows how to use the `test()` method to match a URL against a
 pattern. The example prints the result of the `test()` calls to the console.


```js
const pattern = new URLPattern("http{s}?://\*.example.com/books/:id");

// Absolute URL strings
console.log(pattern.test("https://store.example.com/books/123")); // true
console.log(pattern.test("https://example.com/books/123")); // false

// Relative URL strings
console.log(pattern.test("/books/123", "http://store.example.com")); // true
console.log(pattern.test("/books/123", "data:text/plain,hello world!")); // false
console.log(pattern.test("/books/123")); // false

// Structured objects
console.log(
  pattern.test({
    pathname: "/books/123",
    baseURL: "http://store.example.com",
  }),
); // true
console.log(
  pattern.test({
    protocol: "https",
    hostname: "store.example.com",
    pathname: "/books/123",
  }),
); // true
console.log(
  pattern.test({
    protocol: "file",
    hostname: "store.example.com",
    pathname: "/books/123",
  }),
); // false
```

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

| Specification |
| --- |
| URL Pattern Standard # dom-urlpattern-test |

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

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

See also
--------

* A polyfill of `URLPattern` is available
 on GitHub
URLPattern: hash property
=========================

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

 The **`hash`** read-only property of the `URLPattern` interface is a
 string containing the pattern used to match the fragment part
 of a URL. This value may differ from the input to the constructor due to
 normalization.

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

Value
-----

A string.

Examples
--------

 The below example creates a `URLPattern` object with `books/:id`
 for the `hash` part. This pattern matches any fragment that starts with `books/`
 and ends with an arbitrary string identifier.


```js
const pattern = new URLPattern("https://example.org#books/:id");
console.log(pattern.hash); // 'books/:id'
```

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

| Specification |
| --- |
| URL Pattern Standard # dom-urlpattern-hash |

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

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

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

 The **`username`** read-only property of the `URLPattern` interface is a
 string containing the pattern used to match the username part
 of a URL. This value may differ from the input to the constructor due to
 normalization.

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

Value
-----

A string.

Examples
--------

 The below example creates a `URLPattern` object with `admin` for
 the `username` part. This pattern matches only if the username part of the URL
 is `admin`.


```js
const pattern = new URLPattern({ username: "admin" });
console.log(pattern.username); // 'admin'
```

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

| Specification |
| --- |
| URL Pattern Standard # dom-urlpattern-username |

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

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

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

 The **`protocol`** read-only property of the `URLPattern` interface is a
 string containing the pattern used to match the protocol part
 of a URL. This value may differ from the input to the constructor due to
 normalization.

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

Value
-----

A string.

Examples
--------

 The below example creates a `URLPattern` object with `http{s}?` for
 the `protocol` part. This pattern matches the `http` and `https` protocols.


```js
const pattern = new URLPattern({ protocol: "http{s}?" });
console.log(pattern.protocol); // 'http{s}?'
```

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

| Specification |
| --- |
| URL Pattern Standard # dom-urlpattern-protocol |

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

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

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

 The **`hostname`** read-only property of the `URLPattern` interface is a
 string containing the pattern used to match the hostname part
 of a URL. This value may differ from the input to the constructor due to
 normalization.

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

Value
-----

A string.

Examples
--------

 The below example creates a `URLPattern` object with
 `*.example.org` for the `hostname` part. This pattern matches any hostname that
 is a direct subdomain of `example.org`.


```js
const pattern = new URLPattern("https://\*.example.org");
console.log(pattern.hostname); // '\*.example.org'
```

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

| Specification |
| --- |
| URL Pattern Standard # dom-urlpattern-hostname |

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

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

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

 The **`password`** read-only property of the `URLPattern` interface is a
 string containing the pattern used to match the password part
 of a URL. This value may differ from the input to the constructor due to
 normalization.

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

Value
-----

A string.

Examples
--------

 The below example creates a `URLPattern` object with
 `correct-horse-battery{-staple}?` for the `password` part. This pattern matches
 the passwords `correct-horse-battery` and `correct-horse-battery-staple`.


```js
const pattern = new URLPattern({ password: "correct-horse-battery{-staple}?" });
console.log(pattern.password); // 'correct-horse-battery{-staple}?'
```

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

| Specification |
| --- |
| URL Pattern Standard # dom-urlpattern-password |

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

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

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

 The **`port`** read-only property of the `URLPattern` interface is a
 string containing the pattern used to match the port part of a
 URL. This value may differ from the input to the constructor due to
 normalization.

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

Value
-----

A string.

Examples
--------

 The below example creates a `URLPattern` object with
 `(80|443|8080)` for the `port` part. This pattern matches the port `80`, `443`,
 and `8080`.


```js
const pattern = new URLPattern({ port: "(80|443|8080)" });
console.log(pattern.port); // '(80|443|8080)'
```

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

| Specification |
| --- |
| URL Pattern Standard # dom-urlpattern-port |

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

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

The **`cy`** read-only property of the `SVGCircleElement` interface reflects the `cy` attribute of a `<circle>` element and by that defines the y-coordinate of the circle's center.

If unspecified, the effect is as if the value is set to `0`.

Value
-----

An `SVGAnimatedLength` representing the y-coordinate of the circle's center.

Examples
--------

### SVG


```html
<svg
 xmlns="http://www.w3.org/2000/svg"
 viewBox="0 0 100 100"
 width="200"
 height="200">
  <circle cy="50" cy="50" r="50" fill="gold" id="circle" />
</svg>
```

### JavaScript


```js
const circle = document.getElementById("circle");
console.log(circle.cy);
```

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

| Specification |
| --- |
| Scalable Vector Graphics (SVG) 2 # \_\_svg\_\_SVGCircleElement\_\_cy |

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

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

See also
--------

* `SVGCircleElement.cx`
* `SVGCircleElement.r`
SVGCircleElement: r property
============================

The **`r`** read-only property of the `SVGCircleElement` interface reflects the `r` attribute of a `<circle>` element and by that defines the radius of the circle.

If unspecified, the effect is as if the value is set to `0`.

Value
-----

An `SVGAnimatedLength` representing the radius of the circle.

Examples
--------

### SVG


```html
<svg
 xmlns="http://www.w3.org/2000/svg"
 viewBox="0 0 100 100"
 width="200"
 height="200">
  <circle r="50" r="50" r="50" fill="gold" id="circle" />
</svg>
```

### JavaScript


```js
const circle = document.getElementById("circle");
console.log(circle.r);
```

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

| Specification |
| --- |
| Scalable Vector Graphics (SVG) 2 # \_\_svg\_\_SVGCircleElement\_\_r |

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

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

See also
--------

* `SVGCircleElement.cx`
* `SVGCircleElement.cy`
SVGCircleElement: cx property
=============================

The **`cx`** read-only property of the `SVGCircleElement` interface reflects the `cx` attribute of a `<circle>` element and by that defines the x-coordinate of the circle's center.<

If unspecified, the effect is as if the value is set to `0`.

Value
-----

An `SVGAnimatedLength` representing the x-coordinate of the circle's center.

Examples
--------

### SVG


```html
<svg
 xmlns="http://www.w3.org/2000/svg"
 viewBox="0 0 100 100"
 width="200"
 height="200">
  <circle cx="50" cy="50" r="50" fill="gold" id="circle" />
</svg>
```

### JavaScript


```js
const circle = document.getElementById("circle");
console.log(circle.cx);
```

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

| Specification |
| --- |
| Scalable Vector Graphics (SVG) 2 # \_\_svg\_\_SVGCircleElement\_\_cx |

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

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

See also
--------

* `SVGCircleElement.cy`
* `SVGCircleElement.r`
RTCTrackEvent: receiver property
================================

 The read-only **`receiver`** property
 of the `RTCTrackEvent` interface indicates the
 `RTCRtpReceiver` which is used to receive data containing media for the
 `track` to which the event refers.

Value
-----

 The `RTCRtpTransceiver` which pairs the `receiver` with a
 sender and other properties which establish a single bidirectional SRTP
 stream for use by the `track` associated with the
 `RTCTrackEvent`.


**Note:** The `transceiver`
 includes its own `receiver` property, which
 will always be the same `RTCRtpReceiver` as this one.


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

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # dom-trackevent-receiver |

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

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

 The WebRTC API interface `RTCTrackEvent`'s
 read-only **`transceiver`** property indicates the
 `RTCRtpTransceiver` affiliated with the event's
 `track`.

 The transceiver pairs the track's
 `receiver` with an `RTCRtpSender`.

Value
-----

 The `RTCRtpTransceiver` which pairs the `receiver` with a
 sender and other properties which establish a single bidirectional SRTP
 stream for use by the `track` associated with the
 `RTCTrackEvent`.


**Note:** The `RTCRtpReceiver` referred to by this
 `RTCRtpReceiver`'s `receiver`
 property will always be the same as the `RTCTrackEvent`'s
 `receiver` property.


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

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # dom-trackevent-transceiver |

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

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

 The WebRTC API
 interface `RTCTrackEvent`'s read-only **`track`**
 property specifies the `MediaStreamTrack` that has been added to the
 `RTCPeerConnection`.

Value
-----

 A `MediaStreamTrack` indicating the track which has been added to the
 `RTCPeerConnection`.

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

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # dom-rtctrackevent-track |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
RTCTrackEvent: RTCTrackEvent() constructor
==========================================

 The **`RTCTrackEvent()`** constructor creates and returns a new `RTCTrackEvent` object,
 configured to describe the track which has been added to the `RTCPeerConnection`.

 In general, you won't need to use this constructor, as `RTCTrackEvent`
 objects are created by WebRTC and delivered to your `RTCPeerConnector`'s
 `ontrack` event handler as appropriate.

Syntax
------


```js
new RTCTrackEvent(type, options)
```

### Parameters

`type`

 A string with the name of the event.
 It is case-sensitive and browsers always set it to `track`.


`options`

An object that, *in addition of the properties defined in `Event()`*, can have the following properties:

`receiver`

The `RTCRtpReceiver` which is being used to receive the track's media.

`streams` Optional

 An array of `MediaStream` objects representing each of the streams that comprise the event's corresponding track.
 It defaults to an empty array.


`track`

The `MediaStreamTrack` the event is associated with.

`transceiver`

The `RTCRtpTransceiver` associated with the event.


### Return value

 A new `RTCTrackEvent` describing a track which has been added to the
 `RTCPeerConnection`.

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

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # dom-rtctrackevent-constructor |

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

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

 The WebRTC API
 interface `RTCTrackEvent`'s read-only
 **`streams`** property specifies an array of
 `MediaStream` objects, one for each of the streams that comprise the
 track being added to the `RTCPeerConnection`.

Value
-----

 An `Array` of `MediaStream` objects, one for each stream that
 make up the new track.

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

| Specification |
| --- |
| WebRTC: Real-Time Communication in Browsers # dom-rtctrackevent-streams |

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

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

 The **`HTMLButtonElement.labels`** read-only property returns a
 `NodeList` of the `<label>` elements associated with the
 `<button>` element.

Value
-----

 A `NodeList` containing the `<label>` elements associated
 with the `<button>` element.

Examples
--------

### HTML


```html
<label id="label1" for="test">Label 1</label>
<button id="test">Button</button>
<label id="label2" for="test">Label 2</label>
```

### JavaScript


```js
window.addEventListener("DOMContentLoaded", () => {
  const button = document.getElementById("test");
  for (const label of button.labels) {
    console.log(label.textContent); // "Label 1" and "Label 2"
  }
});
```

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

| Specification |
| --- |
| HTML Standard # dom-lfe-labels-dev |

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

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

The **`HTMLButtonElement.disabled`** property indicates whether the control is disabled, meaning that it does not accept any clicks.

Value
-----

A boolean value.

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

| Specification |
| --- |
| HTML Standard # dom-fe-disabled |

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

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