recursal/MDN huggingface dataset:
VRFieldOfView: rightDegrees property
====================================

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

**Non-standard:** This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The **`rightDegrees`** read-only property of the `VRFieldOfView` interface returns the number of degrees to the right that the field of view extends in.

**Note:** This property was part of the old WebVR API. It has been superseded by the WebXR Device API.

Value
-----

A double.

Examples
--------

See `VRFieldOfView` for example code.

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

This property was part of the old WebVR API that has been superseded by the WebXR Device API. It is no longer on track to becoming a standard.

Until all browsers have implemented the new WebXR APIs, it is recommended to rely on frameworks, like A-Frame, Babylon.js, or Three.js, or a polyfill, to develop WebXR applications that will work across all browsers [1].

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

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

See also
--------

* WebVR API
VRFieldOfView: leftDegrees property
===================================

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

**Non-standard:** This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The **`leftDegrees`** read-only property of the `VRFieldOfView` interface returns the number of degrees to the left that the field of view extends in.

**Note:** This property was part of the old WebVR API. It has been superseded by the WebXR Device API.

Value
-----

A double.

Examples
--------

See `VRFieldOfView` for example code.

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

This property was part of the old WebVR API that has been superseded by the WebXR Device API. It is no longer on track to becoming a standard.

Until all browsers have implemented the new WebXR APIs, it is recommended to rely on frameworks, like A-Frame, Babylon.js, or Three.js, or a polyfill, to develop WebXR applications that will work across all browsers [1].

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

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

See also
--------

* WebVR API
BarProp: visible property
=========================

The **`visible`** read-only property of the `BarProp` interface returns `true` if the user interface element it represents is visible.

Value
-----

 A `Boolean`, which is true if the top-level window is opened by
 `window.open` with the requesting a popup window.popup\_feature.


**Note:** Historically this represented whether the interface element used is visible
 or not. But for privacy reasons, this no longer represents the actual visibility of each
 interface element.


Examples
--------

The following example prints `true` to the console if the window is not a popup.


```js
console.log(window.locationbar.visible);
```

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

| Specification |
| --- |
| HTML Standard # dom-barprop-visible |

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

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

 The **`cancel()`** method of the `SpeechSynthesis`
 interface removes all utterances from the utterance queue.

If an utterance is currently being spoken, speaking will stop immediately.

Syntax
------


```js
cancel()
```

### Parameters

None.

### Return value

None (`undefined`).

Examples
--------


```js
const synth = window.speechSynthesis;

const utterance1 = new SpeechSynthesisUtterance(
  "How about we say this now? This is quite a long sentence to say.",
);
const utterance2 = new SpeechSynthesisUtterance(
  "We should say another sentence too, just to be on the safe side.",
);

synth.speak(utterance1);
synth.speak(utterance2);

synth.cancel(); // utterance1 stops being spoken immediately, and both are removed from the queue
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesis-cancel |

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

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

See also
--------

* Web Speech API
SpeechSynthesis: resume() method
================================

 The **`resume()`** method of the `SpeechSynthesis`
 interface puts the `SpeechSynthesis` object into a non-paused state:
 resumes it if it was already paused.

Syntax
------


```js
resume()
```

### Parameters

None.

### Return value

None (`undefined`).

Examples
--------


```js
let synth = window.speechSynthesis;

let utterance1 = new SpeechSynthesisUtterance(
  "How about we say this now? This is quite a long sentence to say.",
);
let utterance2 = new SpeechSynthesisUtterance(
  "We should say another sentence too, just to be on the safe side.",
);

synth.speak(utterance1);
synth.speak(utterance2);

synth.pause(); // pauses utterances being spoken
synth.resume(); // resumes speaking
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesis-resume |

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

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

See also
--------

* Web Speech API
SpeechSynthesis: speaking property
==================================

 The **`speaking`** read-only property of the
 `SpeechSynthesis` interface is a boolean value that returns
 `true` if an utterance is currently in the process of being spoken — even
 if `SpeechSynthesis` is in a
 `paused` state.

Value
-----

A boolean value.

Examples
--------


```js
const synth = window.speechSynthesis;

const utterance1 = new SpeechSynthesisUtterance(
  "How about we say this now? This is quite a long sentence to say.",
);
const utterance2 = new SpeechSynthesisUtterance(
  "We should say another sentence too, just to be on the safe side.",
);

synth.speak(utterance1);
synth.speak(utterance2);

const amISpeaking = synth.speaking; // will return true if utterance 1 or utterance 2 are currently being spoken
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesis-speaking |

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

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

See also
--------

* Web Speech API
SpeechSynthesis: pending property
=================================

 The **`pending`** read-only property of the
 `SpeechSynthesis` interface is a boolean value that returns
 `true` if the utterance queue contains as-yet-unspoken utterances.

Value
-----

A boolean value.

Examples
--------


```js
const synth = window.speechSynthesis;

const utterance1 = new SpeechSynthesisUtterance(
  "How about we say this now? This is quite a long sentence to say.",
);
const utterance2 = new SpeechSynthesisUtterance(
  "We should say another sentence too, just to be on the safe side.",
);

synth.speak(utterance1);
synth.speak(utterance2);

const amIPending = synth.pending; // will return true if utterance 1 is still being spoken and utterance 2 is in the queue
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesis-pending |

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

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

See also
--------

* Web Speech API
SpeechSynthesis: paused property
================================

 The **`paused`** read-only property of the
 `SpeechSynthesis` interface is a boolean value that returns
 `true` if the `SpeechSynthesis` object is in a paused state, or `false` if not.

 It can be set to `paused` even if nothing is
 currently being spoken through it. If
 `utterances` are then added to the utterance
 queue, they will not be spoken until the `SpeechSynthesis` object is
 unpaused, using `SpeechSynthesis.resume()`.

Value
-----

A boolean value.

Examples
--------


```js
const synth = window.speechSynthesis;

synth.pause();

const amIPaused = synth.paused; // will return true
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesis-paused |

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

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

See also
--------

* Web Speech API
SpeechSynthesis: pause() method
===============================

 The **`pause()`** method of the `SpeechSynthesis`
 interface puts the `SpeechSynthesis` object into a paused state.

Syntax
------


```js
pause()
```

### Parameters

None.

### Return value

None (`undefined`).

Examples
--------


```js
const synth = window.speechSynthesis;

const utterance1 = new SpeechSynthesisUtterance(
  "How about we say this now? This is quite a long sentence to say.",
);
const utterance2 = new SpeechSynthesisUtterance(
  "We should say another sentence too, just to be on the safe side.",
);

synth.speak(utterance1);
synth.speak(utterance2);

synth.pause(); // pauses utterances being spoken
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesis-pause |

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

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

See also
--------

* Web Speech API
SpeechSynthesis: speak() method
===============================

 The **`speak()`** method of the `SpeechSynthesis`
 interface adds an `utterance` to the utterance
 queue; it will be spoken when any other utterances queued before it have been spoken.

Syntax
------


```js
speak(utterance)
```

### Parameters

`utterance`

A `SpeechSynthesisUtterance` object.

### Return value

None (`undefined`).

Examples
--------

 This snippet is excerpted from our Speech synthesizer demo (see it live). When a form containing the text we want to speak is submitted,
 we (amongst other things) create a new utterance containing this text, then speak it by
 passing it into `speak()` as a parameter.


```js
const synth = window.speechSynthesis;

// ...

inputForm.onsubmit = (event) => {
  event.preventDefault();

  const utterThis = new SpeechSynthesisUtterance(inputTxt.value);
  const selectedOption =
    voiceSelect.selectedOptions[0].getAttribute("data-name");
  for (let i = 0; i < voices.length; i++) {
    if (voices[i].name === selectedOption) {
      utterThis.voice = voices[i];
    }
  }
  synth.speak(utterThis);
  inputTxt.blur();
};
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesis-speak |

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

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

See also
--------

* Web Speech API
SpeechSynthesis: voiceschanged event
====================================

The **`voiceschanged`** event of the Web Speech API is fired when the list of `SpeechSynthesisVoice` objects that would be returned by the `SpeechSynthesis.getVoices()` method has changed (when the `voiceschanged` event fires.)

Syntax
------

Use the event name in methods like `addEventListener()`, or set an event handler property.


```js
addEventListener("voiceschanged", (event) => {});

onvoiceschanged = (event) => {};
```

Event type
----------

A generic `Event` with no added properties.

Examples
--------

This could be used to repopulate a list of voices that the user can choose between when the event fires. You can use the `voiceschanged` event in an `addEventListener` method:


```js
const synth = window.speechSynthesis;

synth.addEventListener("voiceschanged", () => {
  const voices = synth.getVoices();
  for (let i = 0; i < voices.length; i++) {
    const option = document.createElement("option");
    option.textContent = `${voices[i].name} (${voices[i].lang})`;
    option.setAttribute("data-lang", voices[i].lang);
    option.setAttribute("data-name", voices[i].name);
    voiceSelect.appendChild(option);
  }
});
```


Or use the `onvoiceschanged` event handler property:


```js
const synth = window.speechSynthesis;
synth.onvoiceschanged = () => {
  const voices = synth.getVoices();
  for (let i = 0; i < voices.length; i++) {
    const option = document.createElement("option");
    option.textContent = `${voices[i].name} (${voices[i].lang})`;
    option.setAttribute("data-lang", voices[i].lang);
    option.setAttribute("data-name", voices[i].name);
    voiceSelect.appendChild(option);
  }
};
```

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

| Specification |
| --- |
| Web Speech API # eventdef-speechsynthesis-voiceschanged |
| Web Speech API # dom-speechsynthesis-onvoiceschanged |

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

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

See also
--------

* Web Speech API
SpeechSynthesis: getVoices() method
===================================

 The **`getVoices()`** method of the
 `SpeechSynthesis` interface returns a list of
 `SpeechSynthesisVoice` objects representing all the available voices on the
 current device.

Syntax
------


```js
getVoices()
```

### Parameters

None.

### Return value

A list (array) of `SpeechSynthesisVoice` objects.

Examples
--------

### JavaScript


```js
function populateVoiceList() {
  if (typeof speechSynthesis === "undefined") {
    return;
  }

  const voices = speechSynthesis.getVoices();

  for (let i = 0; i < voices.length; i++) {
    const option = document.createElement("option");
    option.textContent = `${voices[i].name} (${voices[i].lang})`;

    if (voices[i].default) {
      option.textContent += " — DEFAULT";
    }

    option.setAttribute("data-lang", voices[i].lang);
    option.setAttribute("data-name", voices[i].name);
    document.getElementById("voiceSelect").appendChild(option);
  }
}

populateVoiceList();
if (
  typeof speechSynthesis !== "undefined" &&
  speechSynthesis.onvoiceschanged !== undefined
) {
  speechSynthesis.onvoiceschanged = populateVoiceList;
}
```

### HTML


```html
<select id="voiceSelect"></select>
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesis-getvoices |

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

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

See also
--------

* Web Speech API
HTMLFormControlsCollection: namedItem() method
==============================================

 The **`HTMLFormControlsCollection.namedItem()`** method returns
 the `RadioNodeList` or the `Element` in the collection whose
 `name` or `id` match the specified name, or `null` if
 no node matches.

 Note that this version of `namedItem()` hides the one inherited from
 `HTMLCollection`. Like that one, in JavaScript, using the array bracket
 syntax with a `String`, like `collection["value"]` is
 equivalent to `collection.namedItem("value")`.

Syntax
------


```js
namedItem(name)
[name]
```

### Parameters

`name`

A string which will be used to match against the `name` or `id` attributes of the controls in this `HTMLFormControlsCollection` object.

### Return value

* A `RadioNodeList`, `Element`, or `null`.
Examples
--------

### Using namedItem()

#### HTML


```html
<form>
  <label for="notes">Notes:</label>
  <input id="notes" name="my-form-control" type="text" />

  <label for="start">Start date:</label>
  <input id="start" name="my-form-control" type="date" />
</form>

<div id="output"></div>
```


```
div {
  margin: 1rem 0;
}
```


#### JavaScript


```js
const form = document.querySelector("form");
const items = form.elements.namedItem("my-form-control");

const output = document.querySelector("#output");
const itemIDs = Array.from(items)
  .map((item) => `"${item.id}"`)
  .join(", ");
output.textContent = `My items: ${itemIDs}`;
```


#### Result

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

| Specification |
| --- |
| HTML Standard # dom-htmlformcontrolscollection-nameditem-dev |

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

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

See also
--------

* `HTMLCollection.namedItem` that it replaces
Notification: click event
=========================

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

 The **`click`** event of the `Notification`
 interface fires when the user clicks on displayed `Notification`.

 The default behavior is to move the focus to the viewport of the notification's related
 browsing context.
 If you don't want that behavior, call `preventDefault()` on the event object.

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

Syntax
------

Use the event name in methods like `addEventListener()`, or set an event handler property.


```js
addEventListener("click", (event) => {});

onclick = (event) => {};
```

Event type
----------

A generic `Event`.

Examples
--------

 In the following example, we use an onclick handler to open a webpage in a new tab
 (specified by the inclusion of the `'_blank'` parameter) once a notification
 is clicked:


```js
notification.onclick = (event) => {
  event.preventDefault(); // prevent the browser from focusing the Notification's tab
  window.open("http://www.mozilla.org", "\_blank");
};
```

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

| Specification |
| --- |
| Notifications API Standard # dom-notification-onclick |

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

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

See also
--------

* `Notification`
* Using the Notifications API
Notification: title property
============================

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

 The **`title`** read-only property of the
 `Notification` interface indicates the title of the notification, as
 specified in the `title` parameter of the
 `Notification()` constructor.

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

Value
-----

A string.

Examples
--------


```js
function spawnNotification(theBody, theIcon, theTitle) {
  const options = {
    body: theBody,
    icon: theIcon,
  };

  const n = new Notification(theTitle, options);

  console.log(n.title);
}
```

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

| Specification |
| --- |
| Notifications API Standard # dom-notification-title |

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

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

See also
--------

* Using the Notifications API
Notification: renotify property
===============================

**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 **`renotify`** read-only property of the
 `Notification` interface specifies whether the user should be notified
 after a new notification replaces an old one, as specified in the `renotify`
 option of the `Notification()` constructor.

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

Value
-----

 A boolean value. `false` is the default; `true` makes
 the notification renotify the user.

Examples
--------

 The following snippet is intended to fire a notification that renotifies the user after
 it has been replaced; a simple `options` object is created, and then the
 notification is fired using the `Notification()` constructor.


```js
const options = {
  body: "Your code submission has received 3 new review comments.",
  renotify: true,
};

const n = new Notification("New review activity", options);

console.log(n.renotify); // "true"
```

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

| Specification |
| --- |
| Notifications API Standard # dom-notification-renotify |

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

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

See also
--------

* Using the Notifications API
Notification: close() method
============================

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

 The **`close()`** method of the `Notification` interface is used to
 close/remove a previously displayed notification.


**Note:** This API shouldn't be used just to have the notification
 removed from the screen after a fixed delay since this method will also remove the
 notification from any notification tray, preventing users from interacting with it
 after it was initially shown. A valid use for this API would be to remove a
 notification that is no longer relevant (e.g. the user already read the notification
 on the webpage in the case of a messaging app or the following song is already playing
 in a music app).


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

Syntax
------


```js
close()
```

### Parameters

None.

### Return value

None (`undefined`).

Examples
--------

 In the following snippet, we have a simple function that when called creates an
 `options` object and then a new notification. At the end of the function, it
 also calls `close()` inside a
 `addEventListener()` function to remove the
 notification when the relevant content has been read on the webpage.


```js
function spawnNotification(theBody, theIcon, theTitle) {
  const options = {
    body: theBody,
    icon: theIcon,
  };

  const n = new Notification(theTitle, options);
  document.addEventListener("visibilitychange", () => {
    if (document.visibilityState === "visible") {
      // The tab has become visible so clear the now-stale Notification.
      n.close();
    }
  });
}
```

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

| Specification |
| --- |
| Notifications API Standard # dom-notification-close |

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

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

See also
--------

* Using the Notifications API
Notification: image property
============================

**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 **`image`** read-only property of the
 `Notification` interface contains the URL of an image to be displayed as
 part of the notification, as specified in the `image` option of the
 `Notification()` constructor.

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

Value
-----

A string.

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

| Specification |
| --- |
| Notifications API Standard # image-resource |

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

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

See also
--------

* Using the Notifications API