blob: 9daf79ec7aaeb88510b1055f20fd665c82ca8a7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright 2018 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.
// https://github.com/samuelgoto/idle-detection
[
SecureContext,
Exposed=(Window,DedicatedWorker),
ActiveScriptWrappable,
RuntimeEnabled=IdleDetection
] interface IdleDetector : EventTarget {
[CallWith=ScriptState, RaisesException] constructor(optional IdleOptions options = {});
readonly attribute IdleState state;
attribute EventHandler onchange;
[CallWith=ScriptState, RaisesException, MeasureAs=IdleDetectionStart] Promise<void> start();
void stop();
};
|