recursal/MDN huggingface dataset:
MediaKeySystemAccess: getConfiguration() method
===============================================

 The `MediaKeySystemAccess.getConfiguration()` method returns an object with the supported combination of
 the following configuration options:

`initDataTypes` Read only 

Returns a list of supported initialization data type names. An initialization data type is a string indicating the format of the initialization data.

`audioCapabilities` Read only 

Returns a list of supported audio type and capability pairs.

`videoCapabilities` Read only 

Returns a list of supported video type and capability pairs.

`distinctiveIdentifier` Read only 

Indicates whether a persistent distinctive identifier is required.

`persistentState` Read only 

Indicates whether the ability to persist state is required.

Syntax
------


```js
getConfiguration()
```

### Parameters

None.

### Return value

An object.

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

| Specification |
| --- |
| Encrypted Media Extensions # dom-mediakeysystemaccess-getconfiguration |

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

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

 The **`navigator.hardwareConcurrency`** read-only property
 returns the number of logical processors available to run threads on the user's
 computer.

Value
-----

A number between 1 and the number of logical processors potentially available to the user agent.

 Modern computers have multiple physical processor cores in their CPU (two or four cores
 is typical), but each physical core is also usually able to run more than one thread at
 a time using advanced scheduling techniques. So a four-core CPU may offer eight
 **logical processor cores**, for example. The number of logical processor
 cores can be used to measure the number of threads which can effectively be run at once
 without them having to context switch.

 The browser may, however, choose to report a lower number of logical cores in order to
 represent more accurately the number of `Worker`s that can run at once, so
 don't treat this as an absolute measurement of the number of cores in the user's system.

Examples
--------

 In this example, one `Worker` is created for each logical processor
 reported by the browser and a record is created which includes a reference to the new
 worker as well as a Boolean value indicating whether or not we're using that worker yet;
 these objects are, in turn, stored into an array for later use. This creates a pool of
 workers we can use to process requests later.


```js
let workerList = [];

for (let i = 0; i < window.navigator.hardwareConcurrency; i++) {
  let newWorker = {
    worker: new Worker("cpuworker.js"),
    inUse: false,
  };
  workerList.push(newWorker);
}
```

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

| Specification |
| --- |
| HTML Standard # dom-navigator-hardwareconcurrency-dev |

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

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

See also
--------

* `Navigator`
* `WorkerNavigator`
Navigator: contacts property
============================

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

 The **`contacts`** read-only property of the
 `Navigator` interface returns a `ContactsManager` interface
 which allows users to select entries from their contact list and share limited details
 of the selected entries with a website or application.

Value
-----

A `ContactsManager` object. Two successive calls return the same object.

Examples
--------

The following code checks whether the Contact Picker API is supported.


```js
const supported = "contacts" in navigator && "ContactsManager" in window;
```

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

| Specification |
| --- |
| Contact Picker API # dom-navigator-contacts |

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

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

See also
--------

* A Contact Picker for the Web
* A Contact Picker demo on glitch
Navigator: scheduling property
==============================

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

The **`scheduling`** read-only property of the `Navigator` interface returns a `Scheduling` object for the current document, which provides methods and properties to control scheduling tasks.

Value
-----

A `Scheduling` object.

Example
-------

See the `Scheduling.isInputPending()` page for a full example.

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

| Specification |
| --- |
| Early detection of input events # dom-navigator-scheduling |

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

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

See also
--------

* Faster input events with Facebook's first browser API contribution on engineering.fb.com (2019)
* Better JS scheduling with isInputPending() on developer.chrome.com (2020)
* Optimizing long tasks on web.dev (2022)
Navigator: vibrate() method
===========================

 The **`Navigator.vibrate()`** method pulses the vibration
 hardware on the device, if such hardware exists. If the device doesn't support
 vibration, this method has no effect. If a vibration pattern is already in progress when
 this method is called, the previous pattern is halted and the new one begins instead.

 If the method was unable to vibrate because of invalid parameters, it will return
 `false`, else it returns `true`. If the pattern leads to a too
 long vibration, it is truncated: the max length depends on the implementation.

Syntax
------


```js
vibrate(pattern)
```

### Parameters

`pattern`

 Provides a pattern of vibration and pause intervals. Each value indicates a number
 of milliseconds to vibrate or pause, in alternation. You may provide either a single
 value (to vibrate once for that many milliseconds) or an array of values to
 alternately vibrate, pause, then vibrate again. See Vibration API for details.



 Passing a value of `0`, an empty array, or an array containing all zeros
 will cancel any currently ongoing vibration pattern.

### Return value

A boolean.

Security
--------

Sticky user activation is required. The user has to interact with the page or a UI element in order for this feature to work.

Examples
--------


```js
navigator.vibrate(200); // vibrate for 200ms
navigator.vibrate([
  100, 30, 100, 30, 100, 30, 200, 30, 200, 30, 200, 30, 100, 30, 100, 30, 100,
]); // Vibrate 'SOS' in Morse.
```

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

| Specification |
| --- |
| Vibration API (Second Edition) # dom-navigator-vibrate |

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

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

See also
--------

* Vibration API
Navigator: doNotTrack 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 **`Navigator.doNotTrack`** property returns the user's Do Not Track setting, which indicates whether the user is requesting websites and advertisers to not track them.

The value of the property reflects that of the `DNT` HTTP header, i.e. values of `"1"`, `"0"`, or `null`.

Value
-----

A string or `null`.

Examples
--------


```js
console.log(navigator.doNotTrack);
// prints "1" if DNT is enabled; "0" if the user opted-in for tracking; otherwise null
```

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

#### No specification found

No specification data found for `api.Navigator.doNotTrack`.  
Check for problems with this page or contribute a missing `spec_url` to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

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

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

See also
--------

* `DNT` HTTP header
Navigator: pdfViewerEnabled property
====================================

The **`pdfViewerEnabled`** read-only property of the `Navigator` interface indicates whether the browser supports inline display of PDF files when navigating to them.

If inline viewing is not supported the PDF is downloaded and may then be handled by some external application.

**Note:** This method replaces a number of legacy methods of inferring support for inline viewing of PDF files.

Value
-----

`true` if the browser can display PDF files inline when navigating to the file (using either an internal viewer or a PDF viewer extension); otherwise `false`.

Examples
--------

To check PDF inline viewing support:


```js
if (!navigator.pdfViewerEnabled) {
  // The browser does not support inline viewing of PDF files.
}
```

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

| Specification |
| --- |
| HTML Standard # dom-navigator-pdfviewerenabled |

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

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

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

The **`clipboard`** read-only property of the `Navigator` interface returns a `Clipboard` object used to read and write the clipboard's contents.

This is the entry point to the Clipboard API, which can be used to implement cut, copy, and paste features within a web application.

Value
-----

The `Clipboard` object used to access the system clipboard.

Examples
--------

The following code uses `navigator.clipboard` to access the system clipboard in order to read text contents from the clipboard.


```js
navigator.clipboard
  .readText()
  .then(
    (clipText) => (document.querySelector(".cliptext").innerText = clipText),
  );
```


 This snippet replaces the contents of the element whose class is `"cliptext"` with the text contents of the clipboard.
 Perhaps this code is being used in a browser extension that displays the current clipboard contents, automatically updating periodically or when specific events fire.

 If the clipboard is empty or doesn't contain text, the `"cliptext"` element's contents are cleared.
 This happens because `readText()` returns an empty string if the clipboard is empty or doesn't contain text.

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

| Specification |
| --- |
| Clipboard API and events # navigator-clipboard |

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

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

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

 The **`Navigator.mediaDevices`** read-only property returns a
 `MediaDevices` object, which provides access to connected media input
 devices like cameras and microphones, as well as screen sharing.

Syntax
------


```js
navigator.mediaDevices
```

### Return value

 The `MediaDevices` singleton object. Usually, you just use this object's
 members directly, such as by calling
 `navigator.mediaDevices.getUserMedia()`.

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

| Specification |
| --- |
| Media Capture and Streams # mediadevices |

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

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

See also
--------

* Media Capture and Streams API:
 The entry point to the documentation about the entire Media Capture and Streams API.
* WebRTC API: Documentation about the
 WebRTC API, which is closely related.
Navigator: keyboard property
============================

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

 The **`keyboard`** read-only property
 of the `Navigator` interface returns a `Keyboard` object
 which provides access to functions that retrieve keyboard layout maps and toggle
 capturing of key presses from the physical keyboard.

Value
-----

A `Keyboard` object.

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

| Specification |
| --- |
| Keyboard Lock # h-navigator-keyboard |

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

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

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

The **`clearAppBadge()`** method of the `Navigator` interface clears a badge on the current app's icon by setting it to `nothing`. The value `nothing` indicates that no badge is currently set, and the status of the badge is *cleared*.

Syntax
------


```js
clearAppBadge()
```

### Parameters

None.

### Return value

A `Promise` that resolves with `undefined`.

### Exceptions

`InvalidStateError` `DOMException`

Thrown if the document is not fully active.

`SecurityError` `DOMException`

Thrown if the call was blocked by the same-origin policy.

`NotAllowedError` `DOMException`

Thrown if `PermissionStatus.state` is not `granted`.

Examples
--------

Once all messages in an application have been read, call `clearAppBadge()` to clear the badge and remove the notification.


```js
navigator.clearAppBadge();
```

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

| Specification |
| --- |
| Badging API # clearappbadge-method |

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

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

See also
--------

* Badging for app icons
Navigator: permissions property
===============================

 The **`Navigator.permissions`** read-only property returns a
 `Permissions` object that can be used to query and update permission
 status of APIs covered by the Permissions API.

Value
-----

A `Permissions` object.

Examples
--------


```js
navigator.permissions.query({ name: "geolocation" }).then((result) => {
  if (result.state === "granted") {
    showMap();
  } else if (result.state === "prompt") {
    showButtonToEnableMap();
  }
  // Don't do anything if the permission was denied.
});
```

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

| Specification |
| --- |
| Permissions # dom-navigator-permissions |

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

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

See also
--------

* Permissions API
* `Navigator`
Navigator: mediaCapabilities property
=====================================

 The **`Navigator.mediaCapabilities`** read-only property
 returns a `MediaCapabilities` object that can expose information about the
 decoding and encoding capabilities for a given format and output capabilities as defined
 by the Media Capabilities API.

Value
-----

A `MediaCapabilities` object.

Examples
--------


```js
navigator.mediaCapabilities
  .decodingInfo({
    type: "file",
    audio: {
      contentType: "audio/mp3",
      channels: 2,
      bitrate: 132700,
      samplerate: 5200,
    },
  })
  .then((result) => {
    console.log(
      `This configuration is ${result.supported ? "" : "not "}supported,`,
    );
    console.log(`${result.smooth ? "" : "not "}smooth, and`);
    console.log(`${result.powerEfficient ? "" : "not "}power efficient.`);
  });
```

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

| Specification |
| --- |
| Media Capabilities # dom-navigator-mediacapabilities |

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

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

See also
--------

* Media Capabilities API
* `Navigator`
Navigator: maxTouchPoints property
==================================

 The **`maxTouchPoints`** read-only property of the
 `Navigator` interface returns the maximum number of simultaneous touch
 contact points are supported by the current device.

Value
-----

A number.

Examples
--------


```js
if (navigator.maxTouchPoints > 1) {
  // browser supports multi-touch
}
```

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

| Specification |
| --- |
| Pointer Events # dom-navigator-maxtouchpoints |

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

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

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

The **`setAppBadge()`** method of the `Navigator` interface sets a badge on the icon associated with this app. If a value is passed to the method, this will be set as the value of the badge. Otherwise the badge will display as a dot, or other indicator as defined by the platform.

Syntax
------


```js
setAppBadge()
setAppBadge(contents)
```

### Parameters

`contents` Optional

A `number` which will be used as the value of the badge. If `contents` is `0` then the badge will be set to `nothing`, indicating a cleared badge.

### Return value

A `Promise` that resolves with `undefined`.

### Exceptions

`InvalidStateError` `DOMException`

Thrown if the document is not fully active.

`SecurityError` `DOMException`

Thrown if the call was blocked by the same-origin policy.

`NotAllowedError` `DOMException`

Thrown if `PermissionStatus.state` is not `granted`.

Examples
--------

In the example below an unread count is passed to `setAppBadge()`. The badge should then display `30`.


```js
const unread = 30;
navigator.setAppBadge(unread);
```

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

| Specification |
| --- |
| Badging API # setappbadge-method |

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

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

See also
--------

* Badging for app icons
Navigator: oscpu 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.

The **`Navigator.oscpu`** property returns a string that identifies the current operating system.

Value
-----

A string providing a string which identifies the operating system on which the browser is running.

| Operating system | `oscpuInfo` string format |
| --- | --- |
| OS/2 | `OS/2 Warp x (either 3, 4 or 4.5)` |
| Windows CE | `WindowsCE x.y` |
| Windows 64-bit (64-bit build) | `Windows NT x.y; Win64; x64` |
| Windows 64-bit (32-bit build) | `Windows NT x.y; WOW64` |
| Windows 32-bit | `Windows NT x.y` |
| Mac OS X (PPC build) | `PowerPC Mac OS X version x.y` |
| Mac OS X (i386/x64 build) | `Intel Mac OS X` or `macOS version x.y` |
| Linux 64-bit (32-bit build) | Output of `uname -s` followed by `i686 on x86_64` |
| Linux | Output of `uname -sm` |

In this table `x.y` refers to the version of the operating system

Examples
--------


```js
function osInfo() {
  alert(navigator.oscpu);
}

osInfo(); // alerts "Windows NT 6.0" for example
```

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

Unless your code is privileged (chrome or at least has the UniversalBrowserRead privilege), it may get the value of the `general.oscpu.override` preference instead of the true platform.

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

| Specification |
| --- |
| HTML Standard # dom-navigator-oscpu |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
Navigator: vendor 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.

The value of the `Navigator` **`vendor`** property is always either "`Google Inc.`", "`Apple Computer, Inc.`", or (in Firefox) the empty string.

Value
-----

* Either "`Google Inc.`", "`Apple Computer, Inc.`", or (in Firefox) the empty string.
Specifications
--------------

| Specification |
| --- |
| HTML Standard # dom-navigator-vendor-dev |

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

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
Navigator: mimeTypes 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.

 Returns a `MimeTypeArray` object, which contains a list of `MimeType` objects representing the MIME types recognized and supported by the browser.
 The array can be queried for information about the enabled plugin that is used to handle a file of the specified type.
 Named properties of the returned object are not enumerable (except in very old browser versions).

 Recent versions of the specification hard-code the returned set of MIME types.
 If PDF files can be displayed inline then `application/pdf` and `text/pdf` are listed.
 Otherwise an empty list is returned.

**Note:** Use `Navigator.pdfViewerEnabled` to determine if inline viewing of PDF files is supported. Do not infer it from this property.

Legacy browser versions do not hard-code the list returned by the property, and might return other MIME types.

Value
-----

A `MimeTypeArray` object which has a `length` property as well as `item(index)` and `namedItem(name)` methods.

 If PDF inline viewing is supported this has entries for MIME types `application/pdf` and `text/pdf`.
 Otherwise an empty `MimeTypeArray` is returned.
 The description and file suffixes supported by enabled plugins are hard coded to `'pdf'` and `'Portable Document Format'`, respectively.

Examples
--------

The code below tests whether PDF files can be viewed inline, and then prints the description of the plugin and the file suffixes it supports.


```js
if ("application/pdf" in navigator.mimeTypes) {
  // browser supports inline viewing of PDF files.

  const { description, suffixes } = navigator.mimeTypes["application/pdf"];
  console.log(`Description: ${description}, Suffix: ${suffixes}`);
  // expected output: Description: Portable Document Format, Suffix: pdf
}
```


 Note that while the above code tests for `application/pdf` you could equally well check `text/pdf`. (Either both or neither MIME type will be true.)
 In addition, on current browsers you don't actually need to get the plugin description and suffixes, because this information is also hard-coded.

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

| Specification |
| --- |
| HTML Standard # dom-navigator-mimetypes |

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

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