/* * Copyright (c) 2025, Shannon Booth * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Web::HTML { struct Agent : public JS::Agent { // https://html.spec.whatwg.org/multipage/webappapis.html#window-event-loop // The event loop of a similar-origin window agent is known as a window event loop. // The event loop of a dedicated worker agent, shared worker agent, or service worker agent is known as a worker event loop. // And the event loop of a worklet agent is known as a worklet event loop. GC::Root event_loop; virtual void spin_event_loop_until(GC::Root> goal_condition) override; protected: using JS::Agent::Agent; }; Agent& relevant_agent(JS::Object const&); }