summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/scheduler/scheduler.idl
blob: a06f1bc2113c138d20d38cf1192cf77f0f59a184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright 2019 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.

// Experimental Scheduling API Proposal:
// https://docs.google.com/document/d/1Apz-SD-pOagGeyWxIpgOi0ARNkrCrELhPdm18eeu9tw
[
    Exposed=Window,
    ImplementedAs=DOMScheduler,
    RuntimeEnabled=WebScheduler
] interface Scheduler {
    [CallWith=ScriptState, MeasureAs=SchedulerPostTask, RaisesException] Promise<any> postTask(SchedulerPostTaskCallback callback, optional SchedulerPostTaskOptions options = {});
    [CallWith=ScriptState, MeasureAs=SchedulerCurrentTaskSignal] readonly attribute TaskSignal currentTaskSignal;
};