recursal/MDN huggingface dataset:
CSSFontPaletteValuesRule: name property
=======================================

The read-only **`name`** property of the `CSSFontPaletteValuesRule` interface represents the name identifying the associated `@font-palette-values` at-rule. A valid name always starts with two dashes, such as `--Alternate`.

Value
-----

A string beginning with two dashes.

Examples
--------

### Read the at-rule's name

This example first defines an `@import` and an `@font-palette-values` at-rule. Then it reads the `@font-palette-values` rule and displays its name. As these rules live in the last stylesheet added to the document, the palette will be the second `CSSRule` returned by the last stylesheet in the document (`document.styleSheets[document.styleSheets.length-1].cssRules`). So, `rules[1]` returns a `CSSFontPaletteValuesRule` object, from which we can access `name`.

#### HTML


```html
<pre id="log">The @font-palette-values at-rule's name:</pre>
```


#### CSS


```css
@import url(https://fonts.googleapis.com/css2?family=Bungee+Spice);

@font-palette-values --Alternate {
  font-family: "Bungee Spice";
  override-colors:
    0 #00ffbb,
    1 #007744;
}

.alternate {
  font-palette: --Alternate;
}
```


#### JavaScript


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

const rules = document.styleSheets[document.styleSheets.length - 1].cssRules;
const fontPaletteValuesRule = rules[1]; // a CSSFontPaletteValuesRule interface
log.textContent += ` ${fontPaletteValuesRule.name}`;
```


#### Result

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

| Specification |
| --- |
| CSS Fonts Module Level 4 # dom-cssfontpalettevaluesrule-name |

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

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

See also
--------

* `@font-palette-values` at-rule
BluetoothUUID: getCharacteristic() static method
================================================

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

The **`getCharacteristic()`** static method of the `BluetoothUUID` interface returns a UUID representing a registered characteristic when passed a name or the 16- or 32-bit UUID alias.

Syntax
------


```js
BluetoothUUID.getCharacteristic(name)
```

### Parameters

`name`

A string containing the name of the characteristic.

### Return value

A 128-bit UUID.

### Exceptions

`TypeError`

Thrown if `name` does not appear in the registry.

Examples
--------

In the following example the UUID representing the characteristic named `apparent_wind_direction` is returned and printed to the console.


```js
let result = BluetoothUUID.getCharacteristic("apparent\_wind\_direction");
console.log(result); // "00002a73-0000-1000-8000-00805f9b34fb"
```

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothuuid-getcharacteristic |

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

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

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

The **`getService()`** static method of the `BluetoothUUID` interface returns a UUID representing a registered service when passed a name or the 16- or 32-bit UUID alias.

Syntax
------


```js
BluetoothUUID.getService(name)
```

### Parameters

`name`

A string containing the name of the service.

### Return value

A 128-bit UUID.

### Exceptions

`TypeError`

Thrown if `name` does not appear in the registry.

Examples
--------

In the following example the UUID representing the service named `device_information` is returned and printed to the console.


```js
let result = BluetoothUUID.getService("device\_information");
console.log(result); // "0000180a-0000-1000-8000-00805f9b34fb"
```

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothuuid-getservice |

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

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

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

The **`canonicalUUID()`** static method of the `BluetoothUUID` interface returns the 128-bit UUID when passed a 16- or 32-bit UUID alias.

Syntax
------


```js
BluetoothUUID.canonicalUUID(alias)
```

### Parameters

`alias`

A string containing a 16-bit or 32-bit UUID alias.

### Return value

A 128-bit UUID.

Examples
--------

In the following example the UUID represented by the alias `0x110A` is returned and printed to the console.


```js
let result = BluetoothUUID.canonicalUUID("0x110A");
console.log(result); // "0000110a-0000-1000-8000-00805f9b34fb"
```

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothuuid-canonicaluuid |

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

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

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

The **`getDescriptor()`** static method of the `BluetoothUUID` interface returns a UUID representing a registered descriptor when passed a name or the 16- or 32-bit UUID alias.

Syntax
------


```js
BluetoothUUID.getDescriptor(name)
```

### Parameters

`name`

A string containing the name of the descriptor.

### Return value

A 128-bit UUID.

### Exceptions

`TypeError`

Thrown if `name` does not appear in the registry.

Examples
--------

In the following example the UUID representing the descriptor named `time_trigger_setting` is returned and printed to the console.


```js
let result = BluetoothUUID.getDescriptor("time\_trigger\_setting");
console.log(result); // "0000290e-0000-1000-8000-00805f9b34fb"
```

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

| Specification |
| --- |
| Web Bluetooth # dom-bluetoothuuid-getdescriptor |

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

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

 The **`localService`** read-only property of the
 `SpeechSynthesisVoice` interface returns a boolean value
 indicating whether the voice is supplied by a local speech synthesizer service
 (`true`), or a remote speech synthesizer service (`false`.)

 This property is provided to allow differentiation in the case that some voice options
 are provided by a remote service; it is possible that remote voices might have extra
 latency, bandwidth or cost associated with them, so such distinction may be useful.

Value
-----

A boolean value.

Examples
--------


```js
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";
  }

  console.log(voices[i].localService);

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

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesisvoice-localservice |

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

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

See also
--------

* Web Speech API
SpeechSynthesisVoice: name property
===================================

 The **`name`** read-only property of the
 `SpeechSynthesisVoice` interface returns a human-readable name that
 represents the voice.

Value
-----

A string representing the name of the voice.

Examples
--------


```js
for (const voice of voices) {
  const option = document.createElement("option");
  option.textContent = `${voice.name} (${voice.lang})`;

  if (voice.default) {
    option.textContent += " — DEFAULT";
  }

  option.setAttribute("data-lang", voice.lang);
  option.setAttribute("data-name", voice.name);
  voiceSelect.appendChild(option);
}
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesisvoice-name |

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

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

See also
--------

* Web Speech API
SpeechSynthesisVoice: voiceURI property
=======================================

 The **`voiceURI`** read-only property of the
 `SpeechSynthesisVoice` interface returns the type of URI and location of
 the speech synthesis service for this voice.

Value
-----

 A string representing the URI of the voice. This is a generic URI and
 can point to local or remote services, e.g. it could be a proprietary system URN or a URL to a remote service.

Examples
--------


```js
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";
  }

  console.log(voices[i].voiceURI);
  // On Mac, this returns URNs, for example 'urn:moz-tts:osx:com.apple.speech.synthesis.voice.daniel'

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

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesisvoice-voiceuri |

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

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

See also
--------

* Web Speech API
SpeechSynthesisVoice: default property
======================================

 The **`default`** read-only property of the
 `SpeechSynthesisVoice` interface returns a boolean value
 indicating whether the voice is the default voice for the current app
 (`true`), or not (`false`.)


**Note:** For some devices, it might be the default voice for the
 voice's language. The spec is not very clear on which it should be, so some
 implementations may differ.


Value
-----

A boolean value.

Examples
--------


```js
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);
  voiceSelect.appendChild(option);
}
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesisvoice-default |

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

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

See also
--------

* Web Speech API
SpeechSynthesisVoice: lang property
===================================

The **`lang`** read-only property of the `SpeechSynthesisVoice` interface returns a BCP 47 language tag indicating the language of the voice.

Value
-----

A string representing the language of the device.

Examples
--------


```js
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);
  voiceSelect.appendChild(option);
}
```

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

| Specification |
| --- |
| Web Speech API # dom-speechsynthesisvoice-lang |

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

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

See also
--------

* Web Speech API
HTMLObjectElement: form property
================================

 The **`form`** read-only property of the
 `HTMLObjectElement` interface returns a `HTMLFormElement`
 representing the object element's form owner, or null if there isn't one.

Value
-----

A `HTMLFormElement`.

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

| Specification |
| --- |
| HTML Standard # dom-fae-form-dev |

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

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

Baseline 2023
-------------

Newly availableSince March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

* Learn more
* See full compatibility
* Report feedback

 The **`validationMessage`** read-only property
 of the `HTMLObjectElement` interface returns a string
 representing a localized message that describes the validation constraints that the
 control does not satisfy (if any). This is the empty string if the control is not a
 candidate for constraint validation (willValidate is false), or it satisfies its
 constraints.

Value
-----

A string.

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

| Specification |
| --- |
| HTML Standard # dom-cva-validationmessage-dev |

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

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

 The **`name`** property of the
 `HTMLObjectElement` interface returns a string that
 reflects the `name` HTML attribute, specifying the name of
 the browsing context.

Value
-----

A string.

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

| Specification |
| --- |
| HTML Standard # dom-object-name |

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

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

Baseline 2023
-------------

Newly availableSince March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

* Learn more
* See full compatibility
* Report feedback

 The **`willValidate`** read-only property of
 the `HTMLObjectElement` interface returns a boolean value that
 indicates whether the element is a candidate for constraint validation. Always false for
 HTMLObjectElement objects.

Value
-----

A boolean value.

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

| Specification |
| --- |
| HTML Standard # dom-cva-willvalidate-dev |

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

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

 The **`height`** property of the
 `HTMLObjectElement` interface Returns a string that
 reflects the `height` HTML attribute, specifying the
 displayed height of the resource in CSS pixels.

Value
-----

A string.

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

| Specification |
| --- |
| HTML Standard # dom-dim-height |

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

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

See also
--------

* `HTMLCanvasElement.height`
* `HTMLImageElement.height`
* `HTMLVideoElement.height`
HTMLObjectElement: contentWindow property
=========================================

 The **`contentWindow`** read-only property of
 the `HTMLObjectElement` interface returns a WindowProxy
 representing the window proxy of the object element's nested browsing context, if any;
 otherwise null.

Value
-----

A `Window`, or `null` if there are none.

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

| Specification |
| --- |
| HTML Standard # dom-object-contentwindow |

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

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

 The **`useMap`** property of the
 `HTMLObjectElement` interface returns a string that
 reflects the `usemap` HTML attribute, specifying a
 `<map>` element to use.

Value
-----

A string.

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

| Specification |
| --- |
| HTML Standard # dom-object-usemap |

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

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

Baseline 2023
-------------

Newly availableSince March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

* Learn more
* See full compatibility
* Report feedback

 The **`validity`** read-only property of the
 `HTMLObjectElement` interface returns a `ValidityState` with
 the validity states that this element is in.

Value
-----

A `ValidityState` object.

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

| Specification |
| --- |
| HTML Standard # dom-cva-validity |

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

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

 The **`type`** property of the
 `HTMLObjectElement` interface returns a string that
 reflects the `type` HTML attribute, specifying the MIME type
 of the resource.

Value
-----

A string.

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

| Specification |
| --- |
| HTML Standard # dom-object-type |

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

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

 The **`width`** property of the
 `HTMLObjectElement` interface returns a string that
 reflects the `width` HTML attribute, specifying the
 displayed width of the resource in CSS pixels.

Value
-----

A string.

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

| Specification |
| --- |
| HTML Standard # dom-dim-width |

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

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

See also
--------

* `HTMLCanvasElement.width`
* `HTMLImageElement.width`
* `HTMLVideoElement.width`
HTMLObjectElement: checkValidity() method
=========================================

Baseline 2023
-------------

Newly availableSince March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

* Learn more
* See full compatibility
* Report feedback

 The **`checkValidity()`** method of the
 `HTMLObjectElement` interface returns a boolean value that always
 is true, because object objects are never candidates for constraint validation.

Syntax
------


```js
checkValidity()
```

### Parameters

None.

### Return value

`true`

### Exceptions

None.

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

| Specification |
| --- |
| HTML Standard # dom-cva-checkvalidity-dev |

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

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

 The **`contentDocument`** read-only property of
 the `HTMLObjectElement` interface Returns a `Document`
 representing the active document of the object element's nested browsing context, if
 any; otherwise null.

Value
-----

A `Document`.

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

| Specification |
| --- |
| HTML Standard # dom-object-contentdocument |

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

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

 The **`data`** property of the
 `HTMLObjectElement` interface returns a string that
 reflects the `data` HTML attribute, specifying the address
 of a resource's data.

Value
-----

A string.

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

| Specification |
| --- |
| HTML Standard # dom-object-data |

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

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

Baseline 2023
-------------

Newly availableSince March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

* Learn more
* See full compatibility
* Report feedback

 The **`setCustomValidity()`** method of the
 `HTMLObjectElement` interface sets a custom validity message for the
 element.

Syntax
------


```js
setCustomValidity(errorMessage)
```

### Parameters

`errorMessage`

The message to use for validity errors.

### Return value

None (`undefined`).

### Exceptions

None.

Examples
--------

 In this example, we pass the ID of an input element, and set different error messages
 depending on whether the value is missing, too low or too high. Additionally you
 *must* call the reportValidity
 method on the same element or nothing will happen.


```js
function validate(inputID) {
  const input = document.getElementById(inputID);
  const validityState = input.validity;

  if (validityState.valueMissing) {
    input.setCustomValidity("You gotta fill this out, yo!");
  } else if (validityState.rangeUnderflow) {
    input.setCustomValidity("We need a higher number!");
  } else if (validityState.rangeOverflow) {
    input.setCustomValidity("Thats too high!");
  } else {
    input.setCustomValidity("");
  }

  input.reportValidity();
}
```


 It's vital to set the message to an empty string if there are no errors. As long as the
 error message is not empty, the form will not pass validation and will not be
 submitted.

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

| Specification |
| --- |
| HTML Standard # dom-cva-setcustomvalidity-dev |

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

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

See also
--------

* `validityState`
* `validityState.valueMissing`
* `validityState.typeMismatch`
* `validityState.patternMismatch`
* `validityState.tooLong`
* `validityState.tooShort`
* `validityState.rangeUnderflow`
* `validityState.rangeOverflow`
* `validityState.stepMismatch`
* `validityState.valid`
* `validityState.customError`