LibWeb: Hook TrustedTypes to the Workers api

This commit is contained in:
Tete17 2025-10-06 18:15:25 +02:00 committed by Luke Wilde
parent e6ac064a34
commit 74aa7e8a82
Notes: github-actions[bot] 2025-10-13 12:23:22 +00:00
4 changed files with 19 additions and 11 deletions

View file

@ -3,12 +3,12 @@
#import <HTML/AbstractWorker.idl>
#import <HTML/MessagePort.idl>
#import <Fetch/Request.idl>
#import <TrustedTypes/TrustedScriptURL.idl>
// https://html.spec.whatwg.org/multipage/workers.html#worker
[Exposed=(Window,DedicatedWorker,SharedWorker)]
interface Worker : EventTarget {
// FIXME: "DOMString scriptURL" should be "(TrustedScriptURL or USVString) scriptURL".
constructor(DOMString scriptURL, optional WorkerOptions options = {});
constructor((TrustedScriptURL or Utf16USVString) scriptURL, optional WorkerOptions options = {});
undefined terminate();
undefined postMessage(any message, sequence<object> transfer);