blob: 3075c435644c36ac5833aff4ecdab2acb11f1515 [file] [log] [blame]
// 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.
enum TaskQueueType { "user-interaction", "background" };
[
Constructor(TaskQueueType queue_type),
ConstructorCallWith=ExecutionContext,
Exposed=Window,
RaisesException=Constructor,
RuntimeEnabled=WorkerTaskQueue,
SecureContext
] interface WorkerTaskQueue {
[CallWith=ScriptState] Promise<any> postFunction(CallbackFunctionTreatedAsScriptValue task, optional AbortSignal signal = null, any... arguments);
[CallWith=ScriptState] Task postTask(CallbackFunctionTreatedAsScriptValue task, any... arguments);
};