Files
ladybird/Libraries/LibIDL/ExposedTo.h
Shannon Booth f27bc38aa7 Everywhere: Remove ShadowRealm support
The proposal has not seemed to progress for a while, and there is
a open issue about module imports which breaks HTML integration.
While we could probably make an AD-HOC change to fix that issue,
it is deep enough in the JS engine that I am not particularly
keen on making that change.

Until other browsers begin to make positive signals about shipping
ShadowRealms, let's remove our implementation for now.

There is still some cleanup that can be done with regard to the
HTML integration, but there are a few more items that need to be
untangled there.
2026-04-05 13:57:58 +02:00

34 lines
890 B
C++

/*
* Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/EnumBits.h>
#include <AK/Error.h>
#include <AK/StringView.h>
namespace IDL {
enum class ExposedTo {
Nobody = 0x0,
DedicatedWorker = 0x1,
SharedWorker = 0x2,
ServiceWorker = 0x4,
AudioWorklet = 0x8,
Window = 0x10,
Worklet = 0x40,
PaintWorklet = 0x80,
LayoutWorklet = 0x100,
// FIXME: Categorize PaintWorklet and LayoutWorklet once we have them and know what they are.
AllWorkers = DedicatedWorker | SharedWorker | ServiceWorker | AudioWorklet, // FIXME: Is "AudioWorklet" a Worker? We'll assume it is for now (here, and line below)
All = AllWorkers | Window | Worklet,
};
AK_ENUM_BITWISE_OPERATORS(ExposedTo);
ErrorOr<ExposedTo> parse_exposure_set(StringView interface_name, StringView exposed);
}