/* * Copyright (c) 2024, Shannon Booth * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::HTML { // https://whatpr.org/html/9893/webappapis.html#shadowrealmglobalscope class ShadowRealmGlobalScope : public DOM::EventTarget { WEB_PLATFORM_OBJECT(ShadowRealmGlobalScope, DOM::EventTarget); JS_DECLARE_ALLOCATOR(ShadowRealmGlobalScope); public: virtual ~ShadowRealmGlobalScope() override; static JS::NonnullGCPtr create(JS::Realm&); // https://whatpr.org/html/9893/webappapis.html#dom-shadowrealmglobalscope-self JS::NonnullGCPtr self() { // The self getter steps are to return this. return *this; } protected: explicit ShadowRealmGlobalScope(JS::Realm&); virtual void initialize(JS::Realm&) override; virtual void visit_edges(Cell::Visitor&) override; }; }