Implement Trusted types worker sinks (#36811)

Part of #36258

Built on top of #36668

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe 2025-05-04 19:05:07 +02:00 committed by GitHub
parent c00e0aae61
commit 1e8896800a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 37 additions and 43 deletions

View file

@ -11,7 +11,7 @@ interface mixin AbstractWorker {
// https://html.spec.whatwg.org/multipage/#worker
[Exposed=(Window,Worker)]
interface Worker : EventTarget {
[Throws] constructor(USVString scriptURL, optional WorkerOptions options = {});
[Throws] constructor((TrustedScriptURL or USVString) scriptURL, optional WorkerOptions options = {});
undefined terminate();
[Throws] undefined postMessage(any message, sequence<object> transfer);

View file

@ -19,6 +19,6 @@ interface WorkerGlobalScope : GlobalScope {
[Exposed=Worker]
partial interface WorkerGlobalScope { // not obsolete
[Throws]
undefined importScripts(DOMString... urls);
undefined importScripts((TrustedScriptURL or USVString)... urls);
readonly attribute WorkerNavigator navigator;
};