Skip to content

Commit

Permalink
Add activated attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobie committed Apr 5, 2017
1 parent 4d9008f commit 378888f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ A [=sensor=] has an associated <dfn>current polling frequency</dfn> which is ini
[SecureContext]
interface Sensor : EventTarget {
readonly attribute DOMHighResTimeStamp? timestamp;
readonly attribute Boolean activated;
void start();
void stop();
attribute EventHandler onchange;
Expand Down Expand Up @@ -681,6 +682,17 @@ with the internal slots described in the following table:
The getter of the {{Sensor/timestamp!!attribute}} attribute returns
[=latest reading=]["timestamp"].

### Sensor.activated ### {#sensor-activated}

<div algorithm="is sensor activated">
The getter of the {{Sensor/activated!!attribute}} attribute must run these steps
or their [=equivalent=]:

1. If <emu-val>this</emu-val>.{{[[state]]}} is "activating",
return `true`.
1. Otherwise, return `false`.
</div>

### Sensor.start() ### {#sensor-start}

<div algorithm="to start a sensor">
Expand Down

0 comments on commit 378888f

Please sign in to comment.