blob: 80e1ccf7f3227ff00beb636597d5040149292aa6 [file] [log] [blame]
// 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/1xU7HyNsEsbXhTgt0ZnXDbeSXm5-m5FzkLJAT6LTizEI/edit#
enum TaskStatus { "pending", "running", "canceled", "completed" };
[
ImplementedAs=DOMTask,
RuntimeEnabled=WebScheduler
] interface Task {
readonly attribute TaskStatus status;
readonly attribute TaskQueuePriority priority;
[CallWith=ScriptState] readonly attribute Promise<any> result;
[CallWith=ScriptState] void cancel();
};