diff --git a/index.bs b/index.bs index 67150fa..33346a2 100644 --- a/index.bs +++ b/index.bs @@ -75,6 +75,10 @@ urlPrefix: https://wicg.github.io/feature-policy/; spec: FEATURE-POLICY text: feature name text: policy-controlled feature text: allowed to use +urlPrefix: https://www.w3.org/TR/permissions; spec: PERMISSIONS + type: dfn + text: permission name + text: permission state
spec: webidl; type:dfn; text:attribute @@ -744,9 +748,14 @@ never exceed the [=sampling frequency=] for the given [=sensor type=]. ## Conditions to expose sensor readings ## {#concepts-can-expose-sensor-readings} The user agent must verify that all [=mandatory conditions=] are satisfied to ensure it -can expose sensor readings to a given [=active document=]. +can expose sensor readings to the {{Sensor}} objects of a certain +[=sensor type|type=] that belong to a certain [=active document=]. The mandatory conditions are the following: + - The given document is a [=responsible document=] of a [=secure context=]. + - For each [=permission name=] from the [=sensor type=]'s associated + [=sensor permission names=] [=ordered set|set=], the corresponding permission's + [=permission state|state=] is "granted". - [=document visibility state|Visibility state=] of the document is "visible". - The document is [=allowed to use=] all the [=policy-controlled features=] associated with the given [=sensor type=]. @@ -771,9 +780,9 @@ A [=sensor type=] has a [=ordered set|set=] of associated sensorssensor permission names. +[=permission names=] referred to as sensor permission names. -Note: multiple [=sensor types=] may share the same {{PermissionName}}. +Note: multiple [=sensor types=] may share the same [=permission name=]. A [=sensor type=] has a [=permission revocation algorithm=]. @@ -788,25 +797,23 @@ A [=sensor type=] has a [=permission revocation algorithm=]. A [=sensor type=] has a [=set/is empty|nonempty=] [=ordered set|set=] of associated -[=feature names=] referred as sensor feature names. +[=feature names=] referred to as sensor feature names.Sensor
-A [=platform sensor=] has an associated [=ordered set|set=] -of activated sensor objects. -This set is initially [=set/is empty|empty=]. - -The current [=browsing context=]'s [=platform sensor=] has an associated latest reading -[=ordered map|map=] which holds the latest available [=sensor readings=]. +The current [=browsing context=]'s [=platform sensor=] has an associated [=ordered set|set=] +of activated sensor objects, which is initially [=set/is empty|empty=] and an +associated latest reading [=ordered map|map=], which holds the latest available [=sensor readings=]. -Note: User agents can share [=latest reading=] [=ordered map|map=] between different +Note: User agents can share the [=latest reading=] [=ordered map|map=] and +the [=activated sensor objects=] [=ordered set|set=] between different [=browsing context|contexts=] only if the [=origins=] of these contexts' [=active documents=] are [=same origin-domain=]. Any time a new [=sensor reading=] for a [=platform sensor=] is obtained and if the user agent [=can expose sensor readings=] to the current [=browsing context=]'s [=active document=], -[=update latest reading=] is invoked with the [=platform sensor=] -and the [=sensor reading=] as arguments. +the user agent invokes [=update latest reading=] with the [=platform sensor=] and +the [=sensor reading=] as arguments. The [=latest reading=] [=ordered map|map=] contains an [=map/entry=] whose [=map/key=] is "timestamp" and whose [=map/value=] is a high resolution timestamp that estimates the @@ -1637,8 +1644,8 @@ each [=sensor type=] in [=extension specifications=]: Its [=attributes=] which expose [=sensor readings=] are [=read only=] and their getters must return the result of invoking [=get value from latest reading=] with this and [=attribute=] [=identifier=] as arguments. -- A {{PermissionName}}, if the [=sensor type=] is not representing - [=sensor fusion=] (otherwise, {{PermissionName|PermissionNames}} +- A [=permission name=], if the [=sensor type=] is not representing + [=sensor fusion=] (otherwise, [=permission names=] associated with the fusion source [=sensor types=] must be used). An [=extension specification=] may specify the following definitions @@ -1655,8 +1662,8 @@ for each [=sensor types=]:Extending the Permission API
An implementation of the {{Sensor}} interface for each [=sensor type=] must protect its -[=sensor reading|reading=] by associated {{PermissionName}} or {{PermissionDescriptor}}. -A [=Low-level=] {{Sensor|sensor}} may use its interface name as a {{PermissionName}}, +[=sensor reading|reading=] by associated [=permission name=] or {{PermissionDescriptor}}. +A [=Low-level=] {{Sensor|sensor}} may use its interface name as a [=permission name=], for instance, "gyroscope" or "accelerometer". [=sensor fusion|Fusion sensors=] must [=request permission to use|request permission to access=] each of the sensors that are used as a source of fusion. diff --git a/index.html b/index.html index 62dcd77..bd6f45c 100644 --- a/index.html +++ b/index.html @@ -1453,7 +1453,7 @@Generic Sensor API
-Editor’s Draft,
+Editor’s Draft,
- This version: @@ -2058,14 +2058,18 @@
reporting frequency can never exceed the sampling frequency for the given sensor type.
5.6. Conditions to expose sensor readings
-The user agent must verify that all mandatory conditions are satisfied to ensure it can expose sensor readings to a given active document.
+The user agent must verify that all mandatory conditions are satisfied to ensure it can expose sensor readings to the
Sensor
objects of a certain type that belong to a certain active document.The mandatory conditions are the following:
+
- +
The given document is a responsible document of a secure context.
+- +
For each permission name from the sensor type's associated sensor permission names set, the corresponding permission’s state is "granted".
Visibility state of the document is "visible".
The document is allowed to use all the policy-controlled features associated - with the given sensor type.
+ with the given sensor type.Currently focused area belongs to a document whose origin is same origin-domain with the origin of the given active document.
- @@ -2074,20 +2078,20 @@
Note: In order to release hardware resources, the user agent can request underlying platform sensor to suspend notifications about newly available readings until it can expose sensor readings.
6. Model
6.1. Sensor Type
-A sensor type has an associated interface whose inherited interfaces contains
-Sensor
.A sensor type has a set of associated sensors.
-A sensor type may have a default sensor.
-A sensor type has a nonempty set of associated
-PermissionNames
referred as sensor permission names.Note: multiple sensor types may share the same
-PermissionName
.A sensor type has a permission revocation algorithm.
+A sensor type has an associated interface whose inherited interfaces contains
+Sensor
.A sensor type has a set of associated sensors.
+A sensor type may have a default sensor.
+A sensor type has a nonempty set of associated permission names referred to as sensor permission names.
+Note: multiple sensor types may share the same permission name.
+A sensor type has a permission revocation algorithm.
--To invoke the permission revocation algorithm with
+PermissionName
permission_name, run the following steps:To invoke the permission revocation algorithm with
PermissionName
permission_name, run the following steps:
- -
For each sensor_type whose permission names contains permission_name:
+For each sensor_type whose permission names contains permission_name:
- -
For each sensor in sensor_type’s set of associated sensors,
+For each sensor in sensor_type’s set of associated sensors,
Invoke revoke sensor permission with sensor as argument.
@@ -2095,30 +2099,32 @@
A sensor type has a nonempty set of associated feature names referred as sensor feature names.
+A sensor type has a nonempty set of associated feature names referred to as sensor feature names.
6.2. Sensor
-A platform sensor has an associated set of activated sensor objects. -This set is initially empty.
-The current browsing context's platform sensor has an associated latest reading map which holds the latest available sensor readings.
-Note: User agents can share latest reading map between different contexts only if the origins of these contexts' active documents are same origin-domain.
-Any time a new sensor reading for a platform sensor is obtained and if the user agent can expose sensor readings to the current browsing context's active document, update latest reading is invoked with the platform sensor and the sensor reading as arguments.
+The current browsing context's platform sensor has an associated set of activated sensor objects, which is initially empty and an +associated latest reading map, which holds the latest available sensor readings.
+Note: User agents can share the latest reading map and +the activated sensor objects set between different contexts only if the origins of these contexts' active documents are same origin-domain.
+Any time a new sensor reading for a platform sensor is obtained and if the user agent can expose sensor readings to the current browsing context's active document, +the user agent invokes update latest reading with the platform sensor and +the sensor reading as arguments.
The latest reading map contains an entry whose key is "timestamp" and whose value is a high resolution timestamp that estimates the reading timestamp expressed in milliseconds since the time origin.
Note: The accuracy of the reading timestamp estimate depends on the underlying platform interfaces that expose it.
The latest reading["timestamp"] is initially set to null, unless the latest reading map caches a previous reading.
-The other entries of the latest reading map hold the values of the different quantities measured by the platform sensor. +
The other entries of the latest reading map hold the values of the different quantities measured by the platform sensor. The keys of these entries must match the attribute identifier defined by -the sensor type's associated interface. +the sensor type's associated interface. The return value of the attribute getter is -easily obtained by invoking get value from latest reading with the object implementing the sensor type's associated interface +easily obtained by invoking get value from latest reading with the object implementing the sensor type's associated interface and the attribute identifier as arguments.
The value of all latest reading entries is initially set to null.
-A platform sensor has an associated requested sampling frequency which is initially null.
-For a nonempty set of activated sensor objects the requested sampling frequency is equal to optimal sampling frequency, which is estimated -by the user agent taking into account
provided frequencies
of activatedSensors
and sampling frequency bounds +A platform sensor has an associated requested sampling frequency which is initially null.
+For a nonempty set of activated sensor objects the requested sampling frequency is equal to optimal sampling frequency, which is estimated +by the user agent taking into account
provided frequencies
of activatedSensors
and sampling frequency bounds defined by the underlying platform.Note: For example, the user agent may estimate optimal sampling frequency as a Least Common Denominator (LCD) for a set of
provided frequencies
capped @@ -2126,13 +2132,13 @@
This example illustrates a possible implementation of the described Model.
-In the diagram below several activated
Sensor
objects from two +In the diagram below several activated
-Sensor
objects from two different browsing contexts interact with a single device sensor.The
-Sensor
object in "idle" state is not among the platform sensor's activated sensor objects and thus it does not interact with the device sensor.In this example there is a platform sensor instance per browsing context.
-The latest reading map is shared between
+Sensor
objects from the -same context and is updated at rate equal to requested sampling frequency of the corresponding platform sensor.The
+Sensor
object in "idle" state is not among the platform sensor's activated sensor objects and thus it does not interact with the device sensor.In this example there is a platform sensor instance per browsing context.
+The latest reading map is shared between
Sensor
objects from the +same context and is updated at rate equal to requested sampling frequency of the corresponding platform sensor.7. API
7.1. The Sensor Interface
@@ -2152,12 +2158,12 @@double
frequency
; }; -A
+Sensor
object has an associated platform sensor.A
Sensor
object has an associated platform sensor.The task source for the tasks mentioned in this specification is the sensor task source.
- In the following example, firstly, we check whether the user agent has permission to access sensor readings, then we construct accelerometer sensor and add event listeners to get events for platform sensor activation, + In the following example, firstly, we check whether the user agent has permission to access sensor readings, then we construct accelerometer sensor and add event listeners to get events for platform sensor activation, error conditions and notifications about newly available sensor readings. The example - measures and logs maximum total acceleration of a device hosting the platform sensor. + measures and logs maximum total acceleration of a device hosting the platform sensor.The event handler event types for the corresponding Sensor Interface's event handler attributes are defined in Event handlers section.
navigator.permissions.query({ name: 'accelerometer' }).then(result => { if (result.state === 'denied') { @@ -2251,19 +2257,19 @@-
Note: the nodes in the diagram above represent the states of a
+Sensor
object and they should not be -confused with the possible states of the underlying platform sensor or device sensor.Note: the nodes in the diagram above represent the states of a
Sensor
object and they should not be +confused with the possible states of the underlying platform sensor or device sensor.7.1.2. Sensor garbage collection
-A
Sensor
object whose[[state]]
is "activating" must not be garbage collected +A
-Sensor
object whose[[state]]
is "activating" must not be garbage collected if there are any event listeners registered for "activated" events, "reading" events, or "error" events.A
Sensor
object whose[[state]]
is "activated" must not be garbage collected +A
-Sensor
object whose[[state]]
is "activated" must not be garbage collected if there are any event listeners registered for "reading" events, or "error" events.When a
Sensor
object whose[[state]]
is "activated" or "activating" is +When a
Sensor
object whose[[state]]
is "activated" or "activating" is eligible for garbage collection, the user agent must invoke deactivate a sensor object with this object as argument.7.1.3. Sensor internal slots
-Instances of
Sensor
are created +Instances of
Sensor
are created with the internal slots described in the following table:@@ -2274,7 +2280,7 @@
[[state]]
-The current state of the Sensor
object which is one of +The current state of the Sensor
object which is one of "idle", "activating", or "activated". @@ -2283,12 +2289,12 @@
[[frequency]]
A double representing frequency in Hz that is used to calculate - the requested sampling frequency for the associated platform sensor and to define the upper bound of the reporting frequency for this Sensor
object. + the requested sampling frequency for the associated platform sensor and to define the upper bound of the reporting frequency for thisSensor
object.This slot holds the provided
SensorOptions
.frequency
value. It is initially unset.[[lastEventFiredAt]]
-The high resolution timestamp of the latest sensor reading that was sent to observers of the Sensor
object, +The high resolution timestamp of the latest sensor reading that was sent to observers of the Sensor
object, expressed in milliseconds that passed since the time origin. It is initially null.@@ -2395,7 +2401,7 @@ exception cannot be handled synchronously.
7.1.12. Event handlers
The following are the event handlers (and their corresponding event handler event types) -that must be supported as attributes by the objects implementing the
+that must be supported as attributes by the objects implementing theSensor
interface:Sensor
interface:
@@ -2431,7 +2437,7 @@
input - sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.options, a
SensorOptions
object.output @@ -2445,7 +2451,7 @@
Set sensor_instance.
-[[frequency]]
to options.frequency
.Note: there is not guarantee that the requested options.
+frequency
can be respected. The actual sampling frequency can be calculated usingSensor
timestamp
attributes.Note: there is not guarantee that the requested options.
frequency
can be respected. The actual sampling frequency can be calculated usingSensor
timestamp
attributes.8.2. Check sensor policy-controlled features
@@ -2453,7 +2459,7 @@
input - sensor_type, a sensor type.
+sensor_type, a sensor type.
output True if all of the associated sensor feature names are allowed to use, @@ -2481,20 +2487,20 @@
input - sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.output - True if sensor instance was associated with a platform sensor, +
True if sensor instance was associated with a platform sensor, false otherwise.
- -
Let type be the sensor type of sensor_instance.
+Let type be the sensor type of sensor_instance.
If the device has a single device sensor which can provide readings for type, then
- -
Associate sensor_instance with a platform sensor corresponding +
Associate sensor_instance with a platform sensor corresponding to this device sensor.
Return true.
@@ -2506,7 +2512,7 @@If type has an associated default sensor, then
- -
Associate sensor_instance with a platform sensor corresponding +
Associate sensor_instance with a platform sensor corresponding to default sensor.
Return true.
@@ -2521,16 +2527,16 @@
- input
- -
sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.- output
None
- -
Let sensor be the platform sensor associated with sensor_instance.
+Let sensor be the platform sensor associated with sensor_instance.
- -
Append sensor_instance to sensor’s set of activated sensor objects.
+Append sensor_instance to sensor’s set of activated sensor objects.
Invoke set sensor settings with sensor as argument.
- @@ -2542,7 +2548,7 @@
- input
- -
sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.- output
None
@@ -2552,12 +2558,12 @@Remove all tasks associated with sensor_instance from the task queue associated with sensor task source.
- -
Let sensor be the platform sensor associated with sensor_instance.
+Let sensor be the platform sensor associated with sensor_instance.
- -
If sensor’s set of activated sensor objects contains sensor_instance,
+If sensor’s set of activated sensor objects contains sensor_instance,
- -
Remove sensor_instance from sensor’s set of activated sensor objects.
+Remove sensor_instance from sensor’s set of activated sensor objects.
Invoke set sensor settings with sensor as argument.
- @@ -2572,14 +2578,14 @@
- input
- -
sensor, a platform sensor.
+sensor, a platform sensor.
- output
None
- -
Let activated_sensors be sensor’s associated set of activated sensor objects.
+Let activated_sensors be sensor’s associated set of activated sensor objects.
For each s of activated_sensors,
@@ -2597,14 +2603,14 @@
- input
- -
sensor, a platform sensor.
+sensor, a platform sensor.
- output
None
- -
If sensor’s set of activated sensor objects is empty,
+If sensor’s set of activated sensor objects is empty,
Set requested sampling frequency to null.
@@ -2628,7 +2634,7 @@
- input
- -
sensor, a platform sensor.
+sensor, a platform sensor.
reading, a sensor reading.
- output @@ -2644,7 +2650,7 @@
reading.
- -
Let activated_sensors be sensor’s associated set of activated sensor objects.
+Let activated_sensors be sensor’s associated set of activated sensor objects.
Run these sub-steps in parallel:
@@ -2662,7 +2668,7 @@
- input
- -
sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.- output
reporting frequency in Hz.
@@ -2677,7 +2683,7 @@if f is set,
- -
set frequency to f capped by the upper and lower sampling frequency bounds for the associated platform sensor.
+set frequency to f capped by the upper and lower sampling frequency bounds for the associated platform sensor.
Otherwise,
@@ -2695,7 +2701,7 @@
- input
- -
sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.- output
None
@@ -2758,7 +2764,7 @@
- input
- -
sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.- output
None
@@ -2777,7 +2783,7 @@
- input
- -
sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.- output
None
@@ -2788,7 +2794,7 @@
Fire an event named "activate" at sensor_instance.
- -
Let sensor be the platform sensor associated with sensor_instance.
+Let sensor be the platform sensor associated with sensor_instance.
If sensor’s latest reading["timestamp"] is not null,
@@ -2802,7 +2808,7 @@
- input
- -
sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.error, a
DOMException
.- output @@ -2821,7 +2827,7 @@
- input
- -
sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.key, a string representing the name of the value.
- output @@ -2833,7 +2839,7 @@
If sensor_instance.
[[state]]
is "activated",
- -
Let readings be the latest reading of sensor_instance’s related platform sensor.
+Let readings be the latest reading of sensor_instance’s related platform sensor.
If the extension specification defines a local coordinate system for sensor_instance,
@@ -2852,16 +2858,16 @@
- input
- -
sensor_instance, a
+Sensor
object.sensor_instance, a
Sensor
object.- output
- - +
- -
Let sensor be the platform sensor associated with sensor_instance.
+Let sensor be the platform sensor associated with sensor_instance.
- -
Let sensor_permissions be sensor’s associated set of permission names.
+Let sensor_permissions be sensor’s associated set of permission names.
Run these sub-steps in parallel:
@@ -2884,9 +2890,9 @@
9. Extensibility
This section is non-normative.
-This section describes how this specification can be extended to specify APIs for different sensor types.
+This section describes how this specification can be extended to specify APIs for different sensor types.
Such extension specifications are encouraged to focus on a -single sensor type, exposing both high and low level +single sensor type, exposing both high and low level as appropriate.
For an up-to-date list of extension specifications, please refer to [GENERIC-SENSOR-USECASES] and [MOTION-SENSORS] documents.
9.1. Security and Privacy
@@ -2904,16 +2910,16 @@
9.2. Naming
-
Sensor
interfaces for low-level sensors should be -named after their associated platform sensor. +-
Sensor
interfaces for low-level sensors should be +named after their associated platform sensor. So for example, the interface associated with a gyroscope -should be simply namedGyroscope
.Sensor
interfaces for high-level sensors should be -named by combining the physical quantity the platform sensor measures +should be simply namedGyroscope
.Sensor
interfaces for high-level sensors should be +named by combining the physical quantity the platform sensor measures with the "Sensor" suffix. -For example, a platform sensor measuring +For example, a platform sensor measuring the distance at which an object is from it may see its associated interface calledProximitySensor
.Attributes of the
Sensor
subclass that +Attributes of the
Sensor
subclass that hold sensor readings values should be named after the full name of these values. For example, theThermometer
interface should hold @@ -2961,42 +2967,42 @@Following the precepts of the Extensible Web Manifesto [EXTENNNNSIBLE], extension specifications should focus primarily on exposing low-level sensor APIs, but should also expose high-level APIs when they are clear benefits in doing so.
9.5. When is Enabling Multiple Sensors of the Same Type Not the Right Choice?
-It is not advisable to construct multiple
Sensor
instances of the same sensor type with +It is not advisable to construct multiple
-Sensor
instances of the same sensor type with equal construction parameters, as it can lead to unnecessary hardware resources consumption.In cases when multiple observers are interested in notifications of a newly available sensor reading, an event listener can be added on a single
Sensor
instance instead of -creating multiple instances of the same sensor type and using simpleonreading
event +In cases when multiple observers are interested in notifications of a newly available sensor reading, an event listener can be added on a single
-Sensor
instance instead of +creating multiple instances of the same sensor type and using simpleonreading
event handler.Conversely, multiple
Sensors
of the same sensor type can be created when they +Conversely, multiple
Sensors
of the same sensor type can be created when they are intended to be used with different settings, such as: requested sampling frequency, accuracy or other settings defined in extension specifications.9.6. Definition Requirements
The following definitions must be specified for -each sensor type in extension specifications:
+each sensor type in extension specifications:
- -
An interface whose inherited interfaces contains
Sensor
. +An interface whose inherited interfaces contains
Sensor
. This interface must be constructible. Its [Constructor
] must take, as an argument, an optional dictionary whose inherited dictionaries containsSensorOptions
. Its attributes which expose sensor readings are read only and their getters must return the result of invoking get value from latest reading with this and attribute identifier as arguments.- -
A
+PermissionName
, if the sensor type is not representing sensor fusion (otherwise,PermissionNames
associated with the fusion source sensor types must be used).A permission name, if the sensor type is not representing sensor fusion (otherwise, permission names associated with the fusion source sensor types must be used).
An extension specification may specify the following definitions -for each sensor types:
+for each sensor types:
A dictionary whose inherited dictionaries contains
SensorOptions
.- -
A default sensor. Generally, devices are equipped with a single platform sensor of each type, +
A default sensor. Generally, devices are equipped with a single platform sensor of each type, so defining a default sensor should be straightforward. - For sensor types where multiple sensors are common, extension specifications may choose not to define a default sensor, + For sensor types where multiple sensors are common, extension specifications may choose not to define a default sensor, especially when doing so would not make sense.
9.7. Extending the Permission API
-An implementation of the
Sensor
interface for each sensor type must protect its reading by associatedPermissionName
orPermissionDescriptor
. -A Low-levelsensor
may use its interface name as aPermissionName
, +An implementation of the
Sensor
interface for each sensor type must protect its reading by associated permission name orPermissionDescriptor
. +A Low-levelsensor
may use its interface name as a permission name, for instance, "gyroscope" or "accelerometer". Fusion sensors must request permission to access each of the sensors that are used as a source of fusion.Even though, it might be difficult to reconstruct low-level sensor readings from @@ -3014,17 +3020,17 @@
9.8. Extending the Feature Policy API
-An implementation of the
Sensor
interface for each sensor type has one +An implementation of the
Sensor
interface for each sensor type has one (if sensor fusion is not performed) or several policy-controlled features that control whether or not this implementation can be used in a document.The features' default allowlist is
-["self"]
.Note: The default allowlist of
["self"]
allowsSensor
interface +Note: The default allowlist of
-["self"]
allowsSensor
interface implementation usage in same-origin nested frames but prevents third-party content from sensor readings access.The sensor feature names set must contain feature names of +
The sensor feature names set must contain feature names of every associated feature.
-A Low-level
sensor
may use its interface name as a feature name, +A Low-level
+otherwise, the sensor feature names matches the same type-associated sensor permission names.sensor
may use its interface name as a feature name, for instance, "gyroscope" or "accelerometer". Unless the extension specification tells -otherwise, the sensor feature names matches the same type-associated sensor permission names.The accelerometer feature is selectively enabled for third-party origin by adding allow attribute to the frame container element:-<iframe src="https://third-party.com" allow="accelerometer"/></iframe> @@ -3160,7 +3166,7 @@
This is an example of an informative example.
Because this document doesn’t itself define APIs for specific sensor types—
that is the role of extensions to this specification— all examples are inevitably (wishful) fabrications. + Because this document doesn’t itself define APIs for specific sensor types—
that is the role of extensions to this specification— all examples are inevitably (wishful) fabrications. Although all of the sensors used a examples would be great candidates for building atop the Generic Sensor API, their inclusion in this document does not imply that the relevant Working Groups @@ -3440,6 +3446,7 @@ in parallel
- nested browsing context
- origin +
- responsible document
- same origin-domain
- spin the event loop
- task @@ -3475,8 +3482,9 @@
PermissionDescriptor
- PermissionName
- new information about the user's intent +
- permission name
- permission revocation algorithm -
- permission state +
- permission state
- request permission to use
- @@ -3703,22 +3711,22 @@
I
- 5.4. Reading change threshold
- 5.5. Sampling Frequency and Reporting Frequency
- 5.6. Conditions to expose sensor readings -
- 6.2. Sensor (2) (3) (4) (5) (6) (7) (8) (9) -
- 7.1. The Sensor Interface (2) (3) -
- 7.1.1. Sensor lifecycle -
- 7.1.3. Sensor internal slots -
- 8.3. Connect to sensor (2) (3) -
- 8.4. Activate a sensor object -
- 8.5. Deactivate a sensor object -
- 8.6. Revoke sensor permission -
- 8.7. Set sensor settings -
- 8.8. Update latest reading -
- 8.9. Find the reporting frequency of a sensor object -
- 8.12. Notify activated state -
- 8.14. Get value from latest reading -
- 8.15. Request sensor access -
- 9.2. Naming (2) (3) -
- 9.6. Definition Requirements +
- 6.2. Sensor (2) (3) (4) (5) (6) (7) (8) +
- 7.1. The Sensor Interface (2) (3) +
- 7.1.1. Sensor lifecycle +
- 7.1.3. Sensor internal slots +
- 8.3. Connect to sensor (2) (3) +
- 8.4. Activate a sensor object +
- 8.5. Deactivate a sensor object +
- 8.6. Revoke sensor permission +
- 8.7. Set sensor settings +
- 8.8. Update latest reading +
- 8.9. Find the reporting frequency of a sensor object +
- 8.12. Notify activated state +
- 8.14. Get value from latest reading +
- 8.15. Request sensor access +
- 9.2. Naming (2) (3) +
- 9.6. Definition Requirements