Skip to content

Commit

Permalink
Replace timer functions section with upstream PR link (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewarlow authored May 14, 2024
1 parent be22ef9 commit b5454ef
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,25 +1234,7 @@ The first few steps of the [=prepare the script element=] algorithm are modified

### Enforcement in timer functions ### {#enforcement-in-timer-functions}

This document modifies the {{WindowOrWorkerGlobalScope}} interface mixin:

<pre class="idl exclude">
typedef (ScriptString or Function) TrustedTimerHandler;

partial interface mixin WindowOrWorkerGlobalScope {
long setTimeout(TrustedTimerHandler handler, optional long timeout = 0, any... arguments);
long setInterval(TrustedTimerHandler handler, optional long timeout = 0, any... arguments);
};
</pre>

Note: This makes sure that a {{TrustedScript}} is passed to timer
functions in place of a string when Trusted Types are enforced, but
also unconditionally accepts any {{Function}} object.

To the [[HTML5#timer-initialisation-steps|timer initialization steps algorithm]],
change step 8.4.3 as follows:

1. Perform <del>HostEnsureCanCompileStrings</del><ins>EnsureCSPDoesNotBlockStringCompilation</ins>(<var>realm</var>, « », <var>handler</var>,<del> false</del><ins>~timer~, « », <var>handler</var></ins>). If this throws an exception, catch it, report the exception, and abort these steps.
Note: See [https://github.com/whatwg/html/pull/10348](https://github.com/whatwg/html/pull/10348) which upstreams this integration.

### HostEnsureCanCompileStrings ### {#host-ensure-can-compile-strings}

Expand Down

0 comments on commit b5454ef

Please sign in to comment.