blob: 8d122af073b4f4f1bd455d7bc2cff997de5bcd2a [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Specification at:
] interface Sensor : EventTarget {
[MeasureAs=GenericSensorActivated] readonly attribute boolean activated;
readonly attribute boolean hasReading;
[CallWith=ScriptState] readonly attribute DOMHighResTimeStamp? timestamp;
[MeasureAs=GenericSensorStart] void start();
[MeasureAs=GenericSensorStop] void stop();
[MeasureAs=GenericSensorOnError] attribute EventHandler onerror;
[MeasureAs=GenericSensorOnChange] attribute EventHandler onreading;
[MeasureAs=GenericSensorOnActivate] attribute EventHandler onactivate;