Skip to content

Commit dbb7916

Browse files
authored
Limit AbortSignal.timeout to Window and Worker
Worklets are designed with minimal event loops such that they need only run a single task and corresponding microtasks, making APIs that schedule additional tasks unsuitable for worklets. As such, we restrict the availability of AbortSignal.timeout to Window and Worker since the API schedules a task to implement the timeout. Closes #1054.
1 parent db4088a commit dbb7916

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dom.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1771,7 +1771,7 @@ to <a for=AbortSignal>signal abort</a> on <a>this</a>'s <a for=AbortController>s
17711771
[Exposed=*]
17721772
interface AbortSignal : EventTarget {
17731773
[NewObject] static AbortSignal abort(optional any reason);
1774-
[NewObject] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
1774+
[Exposed=(Window,Worker), NewObject] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds);
17751775

17761776
readonly attribute boolean aborted;
17771777
readonly attribute any reason;

0 commit comments

Comments
 (0)