LibWeb/HTML: Implement WorkerGlobalScope::cross_origin_isolated()

This commit is contained in:
Linus Groh 2023-03-05 23:58:01 +00:00
parent ed15c34387
commit b118cc782e
Notes: sideshowbarker 2024-07-17 00:47:29 +09:00

View file

@ -124,9 +124,7 @@ bool WorkerGlobalScope::is_secure_context() const
bool WorkerGlobalScope::cross_origin_isolated() const
{
// The crossOriginIsolated getter steps are to return this's relevant settings object's cross-origin isolated capability.
// FIXME: Is this the same thing as https://html.spec.whatwg.org/multipage/workers.html#concept-workerglobalscope-cross-origin-isolated-capability?
// "A WorkerGlobalScope object has an associated cross-origin isolated capability boolean. It is initially false."
return m_cross_origin_isolated_capability;
return relevant_settings_object(*this).cross_origin_isolated_capability() == CanUseCrossOriginIsolatedAPIs::Yes;
}
// https://html.spec.whatwg.org/multipage/webappapis.html#dom-btoa