mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
LibWeb: Align worker ESO getters with the specification
The `api_base_url()` and `policy_container()` getters now get their respective objects from the global scope.
This commit is contained in:
parent
2d487ee5ab
commit
975a067f58
Notes:
sideshowbarker
2024-07-17 08:37:36 +09:00
Author: https://github.com/tcl3
Commit: 975a067f58
Pull-request: https://github.com/SerenityOS/serenity/pull/24423
Reviewed-by: https://github.com/alimpfard
3 changed files with 31 additions and 6 deletions
|
@ -46,6 +46,30 @@ JS::NonnullGCPtr<WorkerEnvironmentSettingsObject> WorkerEnvironmentSettingsObjec
|
|||
return settings_object;
|
||||
}
|
||||
|
||||
URL::URL WorkerEnvironmentSettingsObject::api_base_url()
|
||||
{
|
||||
// Return worker global scope's url.
|
||||
return m_global_scope->url();
|
||||
}
|
||||
|
||||
Origin WorkerEnvironmentSettingsObject::origin()
|
||||
{
|
||||
// FIXME: Return a unique opaque origin if worker global scope's url's scheme is "data", and inherited origin otherwise.
|
||||
return m_origin;
|
||||
}
|
||||
|
||||
PolicyContainer WorkerEnvironmentSettingsObject::policy_container()
|
||||
{
|
||||
// Return worker global scope's policy container.
|
||||
return m_global_scope->policy_container();
|
||||
}
|
||||
|
||||
CanUseCrossOriginIsolatedAPIs WorkerEnvironmentSettingsObject::cross_origin_isolated_capability()
|
||||
{
|
||||
// FIXME: Return worker global scope's cross-origin isolated capability.
|
||||
return CanUseCrossOriginIsolatedAPIs::No;
|
||||
}
|
||||
|
||||
void WorkerEnvironmentSettingsObject::visit_edges(JS::Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue