recursal/MDN huggingface dataset:
DeviceMotionEvent: rotationRate property
========================================

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

 The **`rotationRate`** read-only property of the `DeviceMotionEvent` interface returns the rate at which the device is rotating around each of its axes in degrees per
 second.


**Note:** If the hardware isn't capable of providing this
 information, this property returns `null`.


Value
-----

 The `rotationRate` property is a read only object describing the rotation
 rates of the device around each of its axes:

`alpha`

 The rate at which the device is rotating about its Z axis; that is, being twisted
 about a line perpendicular to the screen.


`beta`

The rate at which the device is rotating about its X axis; that is, front to back.

`gamma`

The rate at which the device is rotating about its Y axis; that is, side to side.

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

| Specification |
| --- |
| DeviceOrientation Event Specification # ref-for-dom-devicemotionevent-rotationrate② |

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

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

See also
--------

* Detecting device orientation
* Orientation and motion data explained
* `devicemotion` event
DeviceMotionEvent: DeviceMotionEvent() constructor
==================================================

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

The **`DeviceMotionEvent()`** constructor creates a new `DeviceMotionEvent` object.

Syntax
------


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

### Parameters

`type`

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


`options` Optional

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

`acceleration` Optional

A `DeviceMotionEventAcceleration` object giving the acceleration of the device on the three axis X, Y and Z. Acceleration is expressed in m/s². If not specified, every properties in the object will be `null`.

`accelerationIncludingGravity` Optional

A `DeviceMotionEventAcceleration` object giving the acceleration of the device on the three axis X, Y and Z with the effect of gravity. Acceleration is expressed in m/s². If not specified, every properties in the object will be `null`.

`rotationRate` Optional

A `DeviceMotionEventRotationRate` object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma. Rotation rate is express in degrees per seconds. If not specified, every properties in the object will be `null`.

`interval` Optional

A number representing the interval of time, in milliseconds, at which data is obtained from the device. It defaults to `0`.


### Return value

A new `DeviceMotionEvent` object.

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

| Specification |
| --- |
| DeviceOrientation Event Specification # dom-devicemotionevent-devicemotionevent |

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

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

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

 The **`acceleration`** read-only property of the `DeviceMotionEvent` interface returns the amount of acceleration recorded by
 the device, in meters per second squared (m/s²).
 The acceleration value does not include the effect of
 the gravity force, in contrast to `DeviceMotionEvent.accelerationIncludingGravity`.


**Note:** If the hardware doesn't know how to remove gravity from the
 acceleration data, this value may not be present in the
 `DeviceMotionEvent`. In this situation, you'll need to use
 `DeviceMotionEvent.accelerationIncludingGravity` instead.


Value
-----

 The `acceleration` property is an object providing information about
 acceleration on three axis. Each axis is represented with its own property:

`x`

Represents the acceleration upon the x axis which is the west to east axis

`y`

Represents the acceleration upon the y axis which is the south to north axis

`z`

Represents the acceleration upon the z axis which is the down to up axis

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

| Specification |
| --- |
| DeviceOrientation Event Specification # ref-for-dom-devicemotionevent-acceleration③ |

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

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

See also
--------

* Detecting device orientation
* Orientation and motion data explained
* `devicemotion` event
DeviceMotionEvent: interval property
====================================

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

 The **`interval`** read-only property of the `DeviceMotionEvent` interface returns the interval, in milliseconds, at which data is obtained from the underlying
 hardware. You can use this to determine the granularity of motion events.

Value
-----

A number representing the interval of time, in milliseconds.

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

| Specification |
| --- |
| DeviceOrientation Event Specification # ref-for-dom-devicemotionevent-interval① |

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

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

See also
--------

* Detecting device orientation
* Orientation and motion data explained
* `devicemotion` event
DeviceMotionEvent: accelerationIncludingGravity property
========================================================

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

 The **`accelerationIncludingGravity`** read-only property of the `DeviceMotionEvent` interface returns the
 amount of acceleration recorded by the device, in meters per second squared (m/s²). Unlike `DeviceMotionEvent.acceleration`
 which compensates for the influence of gravity, its value is the sum of the acceleration
 of the device as induced by the user and an acceleration equal and opposite to that
 caused by gravity. In other words, it measures the
 g-force. In practice, this value represents
 the raw data measured by an accelerometer.

 This value is not typically as useful as `DeviceMotionEvent.acceleration`,
 but may be the only value available on devices that aren't able to remove gravity from
 the acceleration data, such as on devices that don't have a gyroscope.

**Note:** `accelerationIncludingGravity`'s name can be misleading. This property represents acceleration including *the effects of* gravity. For example, if a device is lying flat on a horizontal surface with the screen pointing up, gravity would be -9.8 along the Z axis, while `acceleration.z` would be 0 and `accelerationIncludingGravity.z` would be 9.8. Similarly, if a device is in free fall with its screen horizontal and pointing up, gravity would be -9.8 along the Z axis, while `acceleration.z` would be -9.8 and `accelerationIncludingGravity.z` would be 0.

Value
-----

 The `accelerationIncludingGravity` property is an object providing
 information about acceleration on three axis. Each axis is represented with its own
 property:

`x`

Represents the acceleration upon the x axis which is the west to east axis

`y`

Represents the acceleration upon the y axis which is the south to north axis

`z`

Represents the acceleration upon the z axis which is the down to up axis

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

| Specification |
| --- |
| DeviceOrientation Event Specification # ref-for-dom-devicemotionevent-accelerationincludinggravity④ |

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

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

See also
--------

* Detecting device orientation
* Orientation and motion data explained
* `devicemotion` event
PushSubscriptionOptions: applicationServerKey property
======================================================

The **`applicationServerKey`** read-only property of the `PushSubscriptionOptions` interface contains the public key used by the push server.

Value
-----

A public key your push server uses to send messages to client apps via a push server. This value is part of a signing key pair generated by your application server, and usable with elliptic curve digital signature (ECDSA), over the P-256 curve. If no `applicationServerKey` member is passed when initialized, it will be set to `null`.

Examples
--------

In the example below the value of `applicationServerKey` is printed to the console.


```js
navigator.serviceWorker.ready.then((reg) => {
  reg.pushManager.getSubscription().then((subscription) => {
    const options = subscription.options;
    console.log(options.applicationServerKey); // the public key
  });
});
```

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

| Specification |
| --- |
| Push API # dom-pushsubscriptionoptions-applicationserverkey |

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

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

The **`userVisibleOnly`** read-only property of the `PushSubscriptionOptions` interface indicates if the returned push subscription will only be used for messages whose effect is made visible to the user.

Value
-----

A boolean value that indicates whether the returned push subscription will only be used for messages whose effect is made visible to the user.

Examples
--------

In the example below the value of `userVisibleOnly` is printed to the console.


```js
navigator.serviceWorker.ready.then((reg) => {
  reg.pushManager.getSubscription().then((subscription) => {
    const options = subscription.options;
    console.log(options.userVisibleOnly); // true if this is a user visible subscription
  });
});
```

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

| Specification |
| --- |
| Push API # dom-pushsubscriptionoptions-uservisibleonly |

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

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

 The **`only()`** static method of the `IDBKeyRange`
 interface creates a new key range containing a single value.

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

Syntax
------


```js
IDBKeyRange.only(value)
```

### Parameters

`value`

The value for the new key range.

### Return value

`IDBKeyRange`: The newly created key range.

### Exceptions

`DataError` `DOMException`

Thrown if the `value` parameter was not a valid key.

Examples
--------

 The following example illustrates how you'd use an only key range. Here we declare
 a `keyRangeValue = IDBKeyRange.only("A");` — a range that only includes the
 value "A". We open a transaction (using `IDBTransaction`) and an object
 store, and open a Cursor with `IDBObjectStore.openCursor`,
 declaring `keyRangeValue` as its optional key range value. This means that
 the cursor will only retrieve the record with the key value "A".


**Note:** For a more complete example allowing you to experiment with
 key range, have a look at our IDBKeyRange
 repo (view the example live too.)



```js
function displayData() {
  const keyRangeValue = IDBKeyRange.only("A");

  const transaction = db.transaction(["fThings"], "readonly");
  const objectStore = transaction.objectStore("fThings");

  objectStore.openCursor(keyRangeValue).onsuccess = (event) => {
    const cursor = event.target.result;
    if (cursor) {
      const listItem = document.createElement("li");
      listItem.textContent = `${cursor.value.fThing}, ${cursor.value.fRating}`;
      list.appendChild(listItem);

      cursor.continue();
    } else {
      console.log("Entries all displayed.");
    }
  };
}
```

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbkeyrange-only① |

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).
IDBKeyRange: upper property
===========================

 The **`upper`** read-only property of the
 `IDBKeyRange` interface returns the upper bound of the key range.

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

Value
-----

The upper bound of the key range (can be any type.)

Examples
--------

 The following example illustrates how you'd use a key range. Here we
 declare `keyRangeValue = IDBKeyRange.upperBound("F", "W", true, true);` — a
 range that includes everything between "F" and "W" but not including them — since both
 the upper and lower bounds have been declared as open (`true`). We open a
 transaction (using `IDBTransaction`) and an object store, and open a Cursor
 with `IDBObjectStore.openCursor`, declaring `keyRangeValue` as
 its optional key range value.

 After declaring the key range, we log its `upper` property value to the
 console, which should appear as "W".


**Note:** For a more complete example allowing you to experiment with
 key range, have a look at our IDBKeyRange-example repo
 (view the example live too.)



```js
function displayData() {
  const keyRangeValue = IDBKeyRange.bound("F", "W", true, true);
  console.log(keyRangeValue.upper);

  const transaction = db.transaction(["fThings"], "readonly");
  const objectStore = transaction.objectStore("fThings");

  objectStore.openCursor(keyRangeValue).onsuccess = (event) => {
    const cursor = event.target.result;
    if (cursor) {
      const listItem = document.createElement("li");
      listItem.textContent = `${cursor.value.fThing}, ${cursor.value.fRating}`;
      list.appendChild(listItem);

      cursor.continue();
    } else {
      console.log("Entries all displayed.");
    }
  };
}
```

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbkeyrange-upper① |

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).
IDBKeyRange: lowerOpen property
===============================

 The **`lowerOpen`** read-only property of the
 `IDBKeyRange` interface returns a boolean indicating whether the
 lower-bound value is included in the key range.

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

Value
-----

A boolean value:

| Value | Indication |
| --- | --- |
| `true` | The lower-bound value is not included in the key range. |
| `false` | The lower-bound value is included in the key range. |

Examples
--------

 The following example illustrates how you'd use a key range. Here we
 declare `keyRangeValue = IDBKeyRange.upperBound("F", "W", true, true);` — a
 range that includes everything between "F" and "W" but not including them — since both
 the upper and lower bounds have been declared as open (`true`). We open a
 transaction (using `IDBTransaction`) and an object store, and open a Cursor
 with `IDBObjectStore.openCursor`, declaring `keyRangeValue` as
 its optional key range value.

 After declaring the key range, we log its `lowerOpen` property value to the
 console, which should appear as "true": the lower bound is open, so won't be included in
 the range.


**Note:** For a more complete example allowing you to experiment with
 key range, have a look at our IDBKeyRange-example repo (view the example live too.)



```js
function displayData() {
  const keyRangeValue = IDBKeyRange.bound("F", "W", true, true);
  console.log(keyRangeValue.lowerOpen);

  const transaction = db.transaction(["fThings"], "readonly");
  const objectStore = transaction.objectStore("fThings");
  objectStore.openCursor(keyRangeValue).onsuccess = (event) => {
    const cursor = event.target.result;
    if (cursor) {
      const listItem = document.createElement("li");
      listItem.textContent = `${cursor.value.fThing}, ${cursor.value.fRating}`;
      list.appendChild(listItem);
      cursor.continue();
    } else {
      console.log("Entries all displayed.");
    }
  };
}
```

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbkeyrange-loweropen① |

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).
IDBKeyRange: lowerBound() static method
=======================================

 The **`lowerBound()`** static method of the
 `IDBKeyRange` interface creates a new key range with only a lower bound.
 By default, it includes the lower endpoint value and is closed.

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

Syntax
------


```js
IDBKeyRange.lowerBound(lower)
IDBKeyRange.lowerBound(lower, open)
```

### Parameters

`lower`

Specifies the lower bound of the new key range.

`open` Optional

 Indicates whether the lower bound excludes the endpoint value. The default is
 false.


### Return value

`IDBKeyRange`: The newly created key range.

### Exceptions

`DataError` `DOMException`

Thrown if the key associated with the `lower` parameter is not a valid key.

Examples
--------

 The following example illustrates how you'd use a lower bound key range. Here we
 declare `keyRangeValue = IDBKeyRange.lowerBound("F", false);` — a range that
 includes the value "F" and everything after it. We open a transaction (using
 `IDBTransaction`) and an object store, and open a Cursor with
 `IDBObjectStore.openCursor`, declaring `keyRangeValue` as its
 optional key range value. This means that the cursor will only retrieve the record with
 the key value "F" and all that come after it. If we used
 `IDBKeyRange.lowerBound("F", true);`, then the range would not include "F";
 only the values after it.


**Note:** For a more complete example allowing you to experiment with
 key range, have a look at our IDBKeyRange-example repo
 (view the example live too.)



```js
function displayData() {
  const keyRangeValue = IDBKeyRange.lowerBound("F");

  const transaction = db.transaction(["fThings"], "readonly");
  const objectStore = transaction.objectStore("fThings");

  objectStore.openCursor(keyRangeValue).onsuccess = (event) => {
    const cursor = event.target.result;
    if (cursor) {
      const listItem = document.createElement("li");
      listItem.textContent = `${cursor.value.fThing}, ${cursor.value.fRating}`;
      list.appendChild(listItem);

      cursor.continue();
    } else {
      console.log("Entries all displayed.");
    }
  };
}
```

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbkeyrange-lowerbound① |

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).
IDBKeyRange: lower property
===========================

 The **`lower`** read-only property of the
 `IDBKeyRange` interface returns the lower bound of the key range.

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

Value
-----

 The lower bound of the key range (can be any
 type.)

Examples
--------

 The following example illustrates how you'd use a key range. Here we
 declare `keyRangeValue = IDBKeyRange.upperBound("F", "W", true, true);` — a
 range that includes everything between "F" and "W" but not including them — since both
 the upper and lower bounds have been declared as open (`true`). We open a
 transaction (using `IDBTransaction`) and an object store, and open a Cursor
 with `IDBObjectStore.openCursor`, declaring `keyRangeValue` as
 its optional key range value.

 After declaring the key range, we log its `lower` property value to the
 console, which should appear as "F".


**Note:** For a more complete example allowing you to experiment with
 key range, have a look at our IDBKeyRange-example repo.
 (View the example live too.



```js
function displayData() {
  const keyRangeValue = IDBKeyRange.bound("F", "W", true, true);
  console.log(keyRangeValue.lower);

  const transaction = db.transaction(["fThings"], "readonly");
  const objectStore = transaction.objectStore("fThings");

  objectStore.openCursor(keyRangeValue).onsuccess = (event) => {
    const cursor = event.target.result;
    if (cursor) {
      const listItem = document.createElement("li");
      listItem.textContent = `${cursor.value.fThing}, ${cursor.value.fRating}`;
      list.appendChild(listItem);

      cursor.continue();
    } else {
      console.log("Entries all displayed.");
    }
  };
}
```

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

| Specification |
| --- |
| Indexed Database API 3.0 # ref-for-dom-idbkeyrange-lower① |

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).