mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Hook TrustedTypes to the Workers api
This commit is contained in:
Notes:
github-actions[bot]
2025-10-13 12:23:22 +00:00
Author: https://github.com/tete17 Commit: https://github.com/LadybirdBrowser/ladybird/commit/74aa7e8a822 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6424 Reviewed-by: https://github.com/Lubrsi ✅ Reviewed-by: https://github.com/tcl3
@@ -26,8 +26,8 @@ class Worker
|
||||
GC_DECLARE_ALLOCATOR(Worker);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<GC::Ref<Worker>> create(String const& script_url, WorkerOptions const& options, DOM::Document& document);
|
||||
static WebIDL::ExceptionOr<GC::Ref<Worker>> construct_impl(JS::Realm& realm, String const& script_url, WorkerOptions const& options)
|
||||
static WebIDL::ExceptionOr<GC::Ref<Worker>> create(TrustedTypes::TrustedScriptURLOrString const& script_url, WorkerOptions const& options, DOM::Document& document);
|
||||
static WebIDL::ExceptionOr<GC::Ref<Worker>> construct_impl(JS::Realm& realm, TrustedTypes::TrustedScriptURLOrString const& script_url, WorkerOptions const& options)
|
||||
{
|
||||
auto& window = as<HTML::Window>(realm.global_object());
|
||||
return Worker::create(script_url, options, window.associated_document());
|
||||
|
||||
Reference in New Issue
Block a user