mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-26 18:09:45 +00:00
LibWeb: Hook TrustedTypes to the Workers api
This commit is contained in:
parent
e6ac064a34
commit
74aa7e8a82
Notes:
github-actions[bot]
2025-10-13 12:23:22 +00:00
Author: https://github.com/tete17
Commit: 74aa7e8a82
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6424
Reviewed-by: https://github.com/Lubrsi ✅
Reviewed-by: https://github.com/tcl3
4 changed files with 19 additions and 11 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue