recursal/MDN huggingface dataset:
VREyeParameters: offset 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 **`offset`** read-only property of the `VREyeParameters` interface represents the offset from the center point between the user's eyes to the center of the eye, measured in meters.

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

This value should represent half the user's interpupillary distance (IPD), but may also represent the distance from the center point of the headset to the center point of the lens for the given eye.

Value
-----

A `Float32Array` representing a vector describing the offset from the center point between the users eyes to the center of the eye in meters.

**Note:** Values for the left eye will be negative; values for the right eye will be positive.

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
VREyeParameters: fieldOfView 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 **`fieldOfView`** read-only property of the `VREyeParameters` interface returns a `VRFieldOfView` object describing the current field of view for the eye, which can vary as the user adjusts their interpupillary distance (IPD).

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

Value
-----

A `VRFieldOfView` object.

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
VREyeParameters: maximumFieldOfView 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 **`maximumFieldOfView`** read-only property of the `VREyeParameters` interface describes the maximum supported field of view for the current eye.

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

Value
-----

A `VRFieldOfView` object.

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`
VREyeParameters: renderWidth 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 **`renderWidth`** read-only property of the `VREyeParameters` interface describes the recommended render target width of each eye viewport, in pixels.

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

This is already in device pixel units, so there's no need to multiply by Window.devicePixelRatio before setting to HTMLCanvasElement.width.

Value
-----

A number, representing the width in pixels.

Examples
--------

See `VREyeParameters` 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
VREyeParameters: renderHeight 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 **`renderHeight`** read-only property of the `VREyeParameters` interface describes the recommended render target height of each eye viewport, in pixels.

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

This is already in device pixel units, so there's no need to multiply by Window.devicePixelRatio before setting to HTMLCanvasElement.height.

Value
-----

A number, representing the height in pixels.

Examples
--------

See `VREyeParameters` 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
IDBObjectStore: clear() method
==============================

 The **`clear()`** method of the `IDBObjectStore`
 interface creates and immediately returns an `IDBRequest` object, and
 clears this object store in a separate thread. This is for deleting all the current
 data out of an object store.

 Clearing an object store consists of removing all records from the object store and
 removing all records in indexes that reference the object store. To remove only some of
 the records in a store, use `IDBObjectStore.delete` passing a key
 or `IDBKeyRange`.

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

Syntax
------


```js
clear()
```

### Parameters

None.

### Return value

An `IDBRequest` object on which subsequent events related to this operation are fired.

If the operation is successful, the value of the request's `result` property is `undefined`.

### Exceptions

`ReadOnlyError` `DOMException`

Thrown if the transaction associated with this operation is in read-only mode.

`TransactionInactiveError` `DOMException`

Thrown if this `IDBObjectStore`'s transaction is inactive.

Examples
--------

 In the following code snippet, we open a read/write transaction on our database and
 clear all the current data out of the object store using `clear()`. For a
 full working example, see our To-do Notifications app
 (view example live).


```js
// Let us open our database
const DBOpenRequest = window.indexedDB.open("toDoList", 4);

DBOpenRequest.onsuccess = (event) => {
  note.innerHTML += "<li>Database initialized.</li>";

  // store the result of opening the database in the db variable.
  // This is used a lot below
  db = DBOpenRequest.result;

  // Clear all the data from the object store
  clearData();
};

function clearData() {
  // open a read/write db transaction, ready for clearing the data
  const transaction = db.transaction(["toDoList"], "readwrite");

  // report on the success of the transaction completing, when everything is done
  transaction.oncomplete = (event) => {
    note.innerHTML += "<li>Transaction completed.</li>";
  };

  transaction.onerror = (event) => {
    note.innerHTML += `<li>Transaction not opened due to error: ${transaction.error}</li>`;
  };

  // create an object store on the transaction
  const objectStore = transaction.objectStore("toDoList");

  // Make a request to clear all the data out of the object store
  const objectStoreRequest = objectStore.clear();

  objectStoreRequest.onsuccess = (event) => {
    // report the success of our request
    note.innerHTML += "<li>Request successful.</li>";
  };
}
```

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbobjectstore-clear③ |

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

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

See also
--------

* Using IndexedDB
* Starting transactions: `IDBDatabase`
* Using transactions: `IDBTransaction`
* Setting a range of keys: `IDBKeyRange`
* Retrieving and making changes to your data: `IDBObjectStore`
* Using cursors: `IDBCursor`
* Reference example: To-do Notifications (View the example live).
IDBObjectStore: keyPath property
================================

 The **`keyPath`** read-only property of the
 `IDBObjectStore` interface returns the key path of this object store.

 If this property is null, the application must provide a key for each modification
 operation.

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

Value
-----

Any value type.

Examples
--------

 In the following code snippet, we open a read/write transaction on our database and add
 some data to an object store using `add()`. After the object store has been
 created, we log `objectStore.keyPath` to
 the console. For a full working example, see our To-do Notifications app
 (view example live).


```js
// Let us open our database
const DBOpenRequest = window.indexedDB.open("toDoList", 4);

DBOpenRequest.onsuccess = (event) => {
  note.innerHTML += "<li>Database initialized.</li>";

  // store the result of opening the database in the db variable.
  // This is used a lot below
  db = DBOpenRequest.result;

  // Run the addData() function to add the data to the database
  addData();
};

function addData() {
  // Create a new object ready to insert into the IDB
  const newItem = [
    {
      taskTitle: "Walk dog",
      hours: 19,
      minutes: 30,
      day: 24,
      month: "December",
      year: 2013,
      notified: "no",
    },
  ];

  // open a read/write db transaction, ready for adding the data
  const transaction = db.transaction(["toDoList"], "readwrite");

  // report on the success of the transaction completing, when everything is done
  transaction.oncomplete = (event) => {
    note.innerHTML += "<li>Transaction completed.</li>";
  };

  transaction.onerror = (event) => {
    note.innerHTML +=
      "<li>Transaction not opened due to error. Duplicate items not allowed.</li>";
  };

  // create an object store on the transaction
  const objectStore = transaction.objectStore("toDoList");
  console.log(objectStore.keyPath);

  // Make a request to add our newItem object to the object store
  const objectStoreRequest = objectStore.add(newItem[0]);

  objectStoreRequest.onsuccess = (event) => {
    // report the success of our request
    note.innerHTML += "<li>Request successful.</li>";
  };
}
```

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbobjectstore-keypath① |

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

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

See also
--------

* Using IndexedDB
* Starting transactions: `IDBDatabase`
* Using transactions: `IDBTransaction`
* Setting a range of keys: `IDBKeyRange`
* Retrieving and making changes to your data: `IDBObjectStore`
* Using cursors: `IDBCursor`
* Reference example: To-do Notifications (View the example live).
IDBObjectStore: autoIncrement property
======================================

 The **`autoIncrement`** read-only property of the
 `IDBObjectStore` interface returns the value of the auto increment flag
 for this object store.

Note that every object store has its own separate auto increment counter.

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

Value
-----

A boolean value:

| Value | Meaning |
| --- | --- |
| `true` | The object store auto increments. |
| `false` | The object store does not auto increment. |

Examples
--------

 In the following code snippet, we open a read/write transaction on our database and add
 some data to an object store using `add()`. After the object store has been
 created, we log `objectStore.autoIncrement` to
 the console. For a full working example, see
 our To-do Notifications app
 (view example live).


```js
// Let us open our database
const DBOpenRequest = window.indexedDB.open("toDoList", 4);

DBOpenRequest.onsuccess = (event) => {
  note.innerHTML += "<li>Database initialized.</li>";

  // store the result of opening the database in the db variable.
  // This is used a lot below
  db = DBOpenRequest.result;

  // Run the addData() function to add the data to the database
  addData();
};

function addData() {
  // Create a new object ready to insert into the IDB
  const newItem = [
    {
      taskTitle: "Walk dog",
      hours: 19,
      minutes: 30,
      day: 24,
      month: "December",
      year: 2013,
      notified: "no",
    },
  ];

  // open a read/write db transaction, ready for adding the data
  const transaction = db.transaction(["toDoList"], "readwrite");

  // report on the success of the transaction completing, when everything is done
  transaction.oncomplete = (event) => {
    note.innerHTML += "<li>Transaction completed.</li>";
  };

  transaction.onerror = (event) => {
    note.innerHTML +=
      "<li>Transaction not opened due to error. Duplicate items not allowed.</li>";
  };

  // create an object store on the transaction
  const objectStore = transaction.objectStore("toDoList");
  console.log(objectStore.autoIncrement);

  // Make a request to add our newItem object to the object store
  const objectStoreRequest = objectStore.add(newItem[0]);

  objectStoreRequest.onsuccess = (event) => {
    // report the success of our request
    note.innerHTML += "<li>Request successful.</li>";
  };
}
```

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbobjectstore-autoincrement① |

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

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

See also
--------

* Using IndexedDB
* Starting transactions: `IDBDatabase`
* Using transactions: `IDBTransaction`
* Setting a range of keys: `IDBKeyRange`
* Retrieving and making changes to your data: `IDBObjectStore`
* Using cursors: `IDBCursor`
* Reference example: To-do Notifications (View the example live).
IDBObjectStore: getAll() method
===============================

 The **`getAll()`** method of the
 `IDBObjectStore` interface returns an `IDBRequest` object
 containing all objects in the object store matching the specified parameter or all
 objects in the store if no parameters are given.

 If a value is successfully found, then a structured clone of it is created and set as
 the result of the request object.

This method produces the same result for:

* a record that doesn't exist in the database
* a record that has an undefined value

To tell these situations apart, you either call

1. the `openCursor()` method with the same
 key. That method provides a cursor if the record exists, and no cursor if it does not.
2. the `count()` method with the same key, which
 will return 1 if the row exists and 0 if it doesn't.
Syntax
------


```js
getAll()
getAll(query)
getAll(query, count)
```

### Parameters

`query` Optional

 A key or `IDBKeyRange` to be queried. If nothing is passed, this will
 default to a key range that selects all the records in this object store.


`count` Optional

 Specifies the number of values to return if more than one is found. If it is lower
 than `0` or greater than `2^32 - 1` a
 `TypeError` exception will be thrown.


### Return value

An `IDBRequest` object on which subsequent events related to this operation are fired.

If the operation is successful, the value of the request's `result` property is an `Array` of the values of all records matching the given query, up to the value of `count`, if `count` was supplied.

### Exceptions

This method may raise a `DOMException` of one of the following types:

`TransactionInactiveError` `DOMException`

Thrown if this `IDBObjectStore`'s transaction is inactive.

`DataError` `DOMException`

Thrown if key or key range provided contains an invalid key or is null.

`InvalidStateError` `DOMException`

Thrown if the `IDBObjectStore` has been deleted or removed.

`TypeError`

Thrown if the `count` parameter is not between `0` and `2^32 - 1` included.

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbobjectstore-getall① |

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

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

See also
--------

* Using IndexedDB
* Starting transactions: `IDBDatabase`
* Using transactions: `IDBTransaction`
* Setting a range of keys: `IDBKeyRange`
* Retrieving and making changes to your data: `IDBObjectStore`
* Using cursors: `IDBCursor`
* Reference example: To-do Notifications (View the example live).
IDBObjectStore: getAllKeys() method
===================================

 The `getAllKeys()` method of the `IDBObjectStore`
 interface returns an `IDBRequest` object retrieves record keys for all
 objects in the object store matching the specified parameter or all objects in the
 store if no parameters are given.

 If a value is successfully found, then a structured clone of it is created and set as
 the result of the request object.

This method produces the same result for:

* a record that doesn't exist in the database
* a record that has an undefined value

 To tell these situations apart, you need to call the
 `openCursor()` method with the same key. That
 method provides a cursor if the record exists, and no cursor if it does not.

Syntax
------


```js
getAllKeys()
getAllKeys(query)
getAllKeys(query, count)
```

### Parameters

`query` Optional

A value that is or resolves to an `IDBKeyRange`.

`count` Optional

 Specifies the number of values to return if more than one is found. If it is lower
 than `0` or greater than `2^32 - 1` a
 `TypeError` exception will be thrown.


### Return value

An `IDBRequest` object on which subsequent events related to this operation are fired.

If the operation is successful, the value of the request's `result` property is an `Array` of the keys for all records matching the given query, up to the value of `count`, if `count` was supplied.

### Exceptions

This method may raise a `DOMException` of one of the following types:

`TransactionInactiveError` `DOMException`

Thrown if this `IDBObjectStore`'s transaction is inactive.

`DataError` `DOMException`

Thrown if the key or key range provided contains an invalid key or is null.

`InvalidStateError` `DOMException`

Thrown if the `IDBObjectStore` has been deleted or removed.

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbobjectstore-getallkeys① |

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

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

See also
--------

* Using IndexedDB
* Starting transactions: `IDBDatabase`
* Using transactions: `IDBTransaction`
* Setting a range of keys: `IDBKeyRange`
* Retrieving and making changes to your data: `IDBObjectStore`
* Using cursors: `IDBCursor`
* Reference example: To-do Notifications (View the example live).