/* * Copyright (c) 2023, Linus Groh * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::HTML { // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope class WindowOrWorkerGlobalScopeMixin { public: virtual ~WindowOrWorkerGlobalScopeMixin(); virtual Bindings::PlatformObject& this_impl() = 0; virtual Bindings::PlatformObject const& this_impl() const = 0; // JS API functions WebIDL::ExceptionOr origin() const; bool is_secure_context() const; bool cross_origin_isolated() const; WebIDL::ExceptionOr btoa(String const& data) const; WebIDL::ExceptionOr atob(String const& data) const; }; }