mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb: Implement current_principal_global_object to shadow realm spec
No functional change, as it is using the yet to be fully implemented 'current_principal_realm'.
This commit is contained in:
committed by
Andrew Kaster
parent
84dc83e0e0
commit
738e603c2f
Notes:
github-actions[bot]
2024-11-01 19:16:49 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/738e603c2f9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1932 Reviewed-by: https://github.com/ADKaster ✅
@@ -319,13 +319,11 @@ EnvironmentSettingsObject& current_principal_settings_object()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#current-global-object
|
||||
// https://whatpr.org/html/9893/webappapis.html#current-principal-global-object
|
||||
JS::Object& current_principal_global_object()
|
||||
{
|
||||
auto& event_loop = HTML::main_thread_event_loop();
|
||||
auto& vm = event_loop.vm();
|
||||
|
||||
// Similarly, the current global object is the global object of the current Realm Record.
|
||||
return vm.current_realm()->global_object();
|
||||
// Similarly, the current principal global object is the global object of the current principal realm.
|
||||
return current_principal_realm().global_object();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm
|
||||
|
||||
Reference in New Issue
Block a user