Skip to content

Commit f0c597a

Browse files
committed
LibWeb/HTML: Use WorkerGlobalScope as Trusted Type sink global name
Corresponds to whatwg/html#10913
1 parent 7da3b06 commit f0c597a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ i32 WindowOrWorkerGlobalScopeMixin::run_timer_initialization_steps(TimerHandler
298298
[&](String const& source) {
299299
// 1. If previousId was not given:
300300
if (!previous_id.has_value()) {
301-
// 1. Let globalName be "Window" if global is a Window object; "Worker" otherwise.
302-
auto global_name = is<Window>(this_impl()) ? "Window"sv : "Worker"sv;
301+
// 1. Let globalName be "Window" if global is a Window object; "WorkerGlobalScope" otherwise.
302+
auto global_name = is<Window>(this_impl()) ? "Window"sv : "WorkerGlobalScope"sv;
303303

304304
// 2. Let methodName be "setInterval" if repeat is true; "setTimeout" otherwise.
305305
auto method_name = repeat == Repeat::Yes ? "setInterval"sv : "setTimeout"sv;

0 commit comments

Comments
 (0)