2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/*
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 *
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * SPDX-License-Identifier: BSD-2-Clause
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-24 15:39:23 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include <LibWeb/Bindings/Intrinsics.h>
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-26 21:02:28 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include <LibWeb/Bindings/PrincipalHostDefined.h>
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include <LibWeb/DOM/Document.h>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include <LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h>
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-28 13:42:07 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include <LibWeb/HTML/Window.h>
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								namespace Web::HTML {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								GC_DEFINE_ALLOCATOR(WindowEnvironmentSettingsObject);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-19 19:47:52 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-04 21:30:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								WindowEnvironmentSettingsObject::WindowEnvironmentSettingsObject(Window& window, NonnullOwnPtr<JS::ExecutionContext> execution_context)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    : EnvironmentSettingsObject(move(execution_context))
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-01 12:14:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    , m_window(window)
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-01 21:22:02 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								WindowEnvironmentSettingsObject::~WindowEnvironmentSettingsObject() = default;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								void WindowEnvironmentSettingsObject::visit_edges(JS::Cell::Visitor& visitor)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2023-03-20 13:37:11 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Base::visit_edges(visitor);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-19 16:18:00 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    visitor.visit(m_window);
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-01 21:22:02 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// https://html.spec.whatwg.org/multipage/window-object.html#set-up-a-window-environment-settings-object
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								void WindowEnvironmentSettingsObject::setup(Page& page, URL::URL const& creation_url, NonnullOwnPtr<JS::ExecutionContext> execution_context, GC::Ptr<Environment> reserved_environment, URL::URL top_level_creation_url, URL::Origin top_level_origin)
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // 1. Let realm be the value of execution context's Realm component.
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-26 16:09:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    auto realm = execution_context->realm;
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    VERIFY(realm);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // 2. Let window be realm's global object.
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-21 10:53:20 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    auto& window = verify_cast<HTML::Window>(realm->global_object());
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // 3. Let settings object be a new environment settings object whose algorithms are defined as follows:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // NOTE: See the functions defined for this class.
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-14 05:50:17 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    auto settings_object = realm->create<WindowEnvironmentSettingsObject>(window, move(execution_context));
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-04 21:30:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    // 4. If reservedEnvironment is non-null, then:
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-24 11:09:36 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    if (reserved_environment) {
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-04 21:30:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        // FIXME:    1. Set settings object's id to reservedEnvironment's id,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //              target browsing context to reservedEnvironment's target browsing context,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //              and active service worker to reservedEnvironment's active service worker.
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-21 10:57:32 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        settings_object->id = reserved_environment->id;
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-04 21:30:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        settings_object->target_browsing_context = reserved_environment->target_browsing_context;
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-21 10:57:32 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        // 2. Set reservedEnvironment's id to the empty string.
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-24 15:44:50 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        reserved_environment->id = String {};
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-04 21:30:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-04 21:30:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    // 5. Otherwise, ...
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        // FIXME: ...set settings object's id to a new unique opaque string,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //        settings object's target browsing context to null,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        //        and settings object's active service worker to null.
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-21 10:57:32 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        static i64 next_id = 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-14 10:05:01 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        settings_object->id = String::number(next_id++);
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-04 21:30:33 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        settings_object->target_browsing_context = nullptr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // 6. Set settings object's creation URL to creationURL,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    //    settings object's top-level creation URL to topLevelCreationURL,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    //    and settings object's top-level origin to topLevelOrigin.
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    settings_object->creation_url = creation_url;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-24 15:44:50 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    settings_object->top_level_creation_url = move(top_level_creation_url);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    settings_object->top_level_origin = move(top_level_origin);
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // 7. Set realm's [[HostDefined]] field to settings object.
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-24 15:39:23 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    // Non-Standard: We store the ESO next to the web intrinsics in a custom HostDefined object
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-14 05:50:17 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    auto intrinsics = realm->create<Bindings::Intrinsics>(*realm);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-26 21:02:28 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    auto host_defined = make<Bindings::PrincipalHostDefined>(settings_object, intrinsics, page);
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-24 15:39:23 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    realm->set_host_defined(move(host_defined));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // Non-Standard: We cannot fully initialize window object until *after* the we set up
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    //    the realm's [[HostDefined]] internal slot as the internal slot contains the web platform intrinsics
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-13 13:05:26 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    MUST(window.initialize_web_interfaces({}));
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// https://html.spec.whatwg.org/multipage/window-object.html#script-settings-for-window-objects:responsible-document
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								GC::Ptr<DOM::Document> WindowEnvironmentSettingsObject::responsible_document()
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // Return window's associated Document.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    return m_window->associated_document();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// https://html.spec.whatwg.org/multipage/window-object.html#script-settings-for-window-objects:api-url-character-encoding
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-23 18:51:03 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								String WindowEnvironmentSettingsObject::api_url_character_encoding() const
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // Return the current character encoding of window's associated Document.
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-24 15:44:50 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    return m_window->associated_document().encoding_or_default();
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// https://html.spec.whatwg.org/multipage/window-object.html#script-settings-for-window-objects:api-base-url
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-23 18:51:03 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								URL::URL WindowEnvironmentSettingsObject::api_base_url() const
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-19 16:02:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    // Return the current base URL of window's associated Document.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    return m_window->associated_document().base_url();
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// https://html.spec.whatwg.org/multipage/window-object.html#script-settings-for-window-objects:concept-settings-object-origin
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-23 18:51:03 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								URL::Origin WindowEnvironmentSettingsObject::origin() const
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // Return the origin of window's associated Document.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    return m_window->associated_document().origin();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-10-13 18:22:11 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// https://html.spec.whatwg.org/multipage/window-object.html#script-settings-for-window-objects:concept-settings-object-policy-container
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-23 18:51:03 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PolicyContainer WindowEnvironmentSettingsObject::policy_container() const
							 | 
						
					
						
							
								
									
										
										
										
											2022-10-13 18:22:11 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // Return the policy container of window's associated Document.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    return m_window->associated_document().policy_container();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// https://html.spec.whatwg.org/multipage/window-object.html#script-settings-for-window-objects:concept-settings-object-cross-origin-isolated-capability
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-23 18:51:03 +13:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								CanUseCrossOriginIsolatedAPIs WindowEnvironmentSettingsObject::cross_origin_isolated_capability() const
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // FIXME: Return true if both of the following hold, and false otherwise:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    //          1. realm's agent cluster's cross-origin-isolation mode is "concrete", and
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    //          2. window's associated Document is allowed to use the "cross-origin-isolated" feature.
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-21 01:21:37 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    return CanUseCrossOriginIsolatedAPIs::Yes;
							 | 
						
					
						
							
								
									
										
										
										
											2021-10-14 16:12:53 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |