mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 13:43:45 +03:00
LibWeb: Port Intrinsics from DeprecatedString
This commit is contained in:
parent
9cd36839d2
commit
96af80acd1
Notes:
sideshowbarker
2024-07-16 23:44:30 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/96af80acd1 Pull-request: https://github.com/SerenityOS/serenity/pull/22057 Reviewed-by: https://github.com/trflynn89
@ -2597,7 +2597,7 @@ void @named_properties_class@::initialize(JS::Realm& realm)
|
||||
} else {
|
||||
generator.append(R"~~~(
|
||||
|
||||
set_prototype(&ensure_web_prototype<@prototype_base_class@>(realm, "@parent_name@"));
|
||||
set_prototype(&ensure_web_prototype<@prototype_base_class@>(realm, "@parent_name@"_fly_string));
|
||||
)~~~");
|
||||
}
|
||||
|
||||
@ -2743,12 +2743,12 @@ void @class_name@::initialize(JS::Realm& realm)
|
||||
)~~~");
|
||||
} else if (is_global_interface && interface.supports_named_properties()) {
|
||||
generator.append(R"~~~(
|
||||
set_prototype(&ensure_web_prototype<@prototype_name@>(realm, "@name@"));
|
||||
set_prototype(&ensure_web_prototype<@prototype_name@>(realm, "@name@"_fly_string));
|
||||
)~~~");
|
||||
} else {
|
||||
generator.append(R"~~~(
|
||||
|
||||
set_prototype(&ensure_web_prototype<@prototype_base_class@>(realm, "@parent_name@"));
|
||||
set_prototype(&ensure_web_prototype<@prototype_base_class@>(realm, "@parent_name@"_fly_string));
|
||||
|
||||
)~~~");
|
||||
}
|
||||
@ -3877,7 +3877,7 @@ JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> @constructor_class@::constru
|
||||
|
||||
// 2. Set prototype to the interface prototype object for interface in targetRealm.
|
||||
VERIFY(target_realm);
|
||||
prototype = &Bindings::ensure_web_prototype<@prototype_class@>(*target_realm, "@name@"sv);
|
||||
prototype = &Bindings::ensure_web_prototype<@prototype_class@>(*target_realm, "@name@"_fly_string);
|
||||
}
|
||||
|
||||
// 7. Set instance.[[Prototype]] to prototype.
|
||||
@ -3903,7 +3903,7 @@ JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> @constructor_class@::constru
|
||||
|
||||
// 2. Set prototype to the interface prototype object of realm whose interface is the same as the interface of the active function object.
|
||||
VERIFY(function_realm);
|
||||
prototype = &Bindings::ensure_web_prototype<@prototype_class@>(*function_realm, "@name@"sv);
|
||||
prototype = &Bindings::ensure_web_prototype<@prototype_class@>(*function_realm, "@name@"_fly_string);
|
||||
}
|
||||
|
||||
VERIFY(prototype.is_object());
|
||||
@ -3937,7 +3937,7 @@ void @constructor_class@::initialize(JS::Realm& realm)
|
||||
[[maybe_unused]] u8 default_attributes = JS::Attribute::Enumerable;
|
||||
|
||||
Base::initialize(realm);
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<@prototype_class@>(realm, "@namespaced_name@"), 0);
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<@prototype_class@>(realm, "@namespaced_name@"_fly_string), 0);
|
||||
define_direct_property(vm.names.length, JS::Value(@constructor.length@), JS::Attribute::Configurable);
|
||||
|
||||
)~~~");
|
||||
@ -4179,7 +4179,7 @@ void @prototype_class@::initialize(JS::Realm& realm)
|
||||
generator.set("namespaced_name", interface.namespaced_name);
|
||||
generator.append(R"~~~(
|
||||
define_direct_property(vm().well_known_symbol_to_string_tag(), JS::PrimitiveString::create(vm(), "@namespaced_name@"_string), JS::Attribute::Configurable);
|
||||
set_prototype(&ensure_web_prototype<@prototype_class@>(realm, "@named_properties_class@"));
|
||||
set_prototype(&ensure_web_prototype<@prototype_class@>(realm, "@named_properties_class@"_fly_string));
|
||||
)~~~");
|
||||
}
|
||||
generator.append(R"~~~(
|
||||
|
@ -168,7 +168,7 @@ template<>
|
||||
void Intrinsics::create_web_namespace<@namespace_class@>(JS::Realm& realm)
|
||||
{
|
||||
auto namespace_object = heap().allocate<@namespace_class@>(realm, realm);
|
||||
m_namespaces.set("@interface_name@"sv, namespace_object);
|
||||
m_namespaces.set("@interface_name@"_fly_string, namespace_object);
|
||||
|
||||
[[maybe_unused]] static constexpr u8 attr = JS::Attribute::Writable | JS::Attribute::Configurable;)~~~");
|
||||
|
||||
@ -180,7 +180,7 @@ void Intrinsics::create_web_namespace<@namespace_class@>(JS::Realm& realm)
|
||||
gen.set("owned_prototype_class", interface.prototype_class);
|
||||
|
||||
gen.append(R"~~~(
|
||||
namespace_object->define_intrinsic_accessor("@owned_interface_name@", attr, [](auto& realm) -> JS::Value { return &Bindings::ensure_web_constructor<@owned_prototype_class@>(realm, "@interface_name@.@owned_interface_name@"sv); });)~~~");
|
||||
namespace_object->define_intrinsic_accessor("@owned_interface_name@", attr, [](auto& realm) -> JS::Value { return &Bindings::ensure_web_constructor<@owned_prototype_class@>(realm, "@interface_name@.@owned_interface_name@"_fly_string); });)~~~");
|
||||
}
|
||||
|
||||
gen.append(R"~~~(
|
||||
@ -204,16 +204,16 @@ void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Rea
|
||||
gen.set("named_properties_class", named_properties_class);
|
||||
gen.append(R"~~~(
|
||||
auto named_properties_object = heap().allocate<@named_properties_class@>(realm, realm);
|
||||
m_prototypes.set("@named_properties_class@"sv, named_properties_object);
|
||||
m_prototypes.set("@named_properties_class@"_fly_string, named_properties_object);
|
||||
|
||||
)~~~");
|
||||
}
|
||||
gen.append(R"~~~(
|
||||
auto prototype = heap().allocate<@prototype_class@>(realm, realm);
|
||||
m_prototypes.set("@interface_name@"sv, prototype);
|
||||
m_prototypes.set("@interface_name@"_fly_string, prototype);
|
||||
|
||||
auto constructor = heap().allocate<@constructor_class@>(realm, realm);
|
||||
m_constructors.set("@interface_name@"sv, constructor);
|
||||
m_constructors.set("@interface_name@"_fly_string, constructor);
|
||||
|
||||
prototype->define_direct_property(vm.names.constructor, constructor.ptr(), JS::Attribute::Writable | JS::Attribute::Configurable);
|
||||
constructor->define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "@interface_name@"_string), JS::Attribute::Configurable);
|
||||
@ -224,7 +224,7 @@ void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Rea
|
||||
gen.set("legacy_constructor_class", legacy_constructor->constructor_class);
|
||||
gen.append(R"~~~(
|
||||
auto legacy_constructor = heap().allocate<@legacy_constructor_class@>(realm, realm);
|
||||
m_constructors.set("@legacy_interface_name@"sv, legacy_constructor);
|
||||
m_constructors.set("@legacy_interface_name@"_fly_string, legacy_constructor);
|
||||
|
||||
legacy_constructor->define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "@legacy_interface_name@"_string), JS::Attribute::Configurable);)~~~");
|
||||
}
|
||||
@ -334,12 +334,12 @@ void add_@global_object_snake_name@_exposed_interfaces(JS::Object& global)
|
||||
gen.set("prototype_class", prototype_class);
|
||||
|
||||
gen.append(R"~~~(
|
||||
global.define_intrinsic_accessor("@interface_name@", attr, [](auto& realm) -> JS::Value { return &ensure_web_constructor<@prototype_class@>(realm, "@interface_name@"sv); });)~~~");
|
||||
global.define_intrinsic_accessor("@interface_name@", attr, [](auto& realm) -> JS::Value { return &ensure_web_constructor<@prototype_class@>(realm, "@interface_name@"_fly_string); });)~~~");
|
||||
|
||||
if (legacy_constructor.has_value()) {
|
||||
gen.set("legacy_interface_name", legacy_constructor->name);
|
||||
gen.append(R"~~~(
|
||||
global.define_intrinsic_accessor("@legacy_interface_name@", attr, [](auto& realm) -> JS::Value { return &ensure_web_constructor<@prototype_class@>(realm, "@legacy_interface_name@"sv); });)~~~");
|
||||
global.define_intrinsic_accessor("@legacy_interface_name@", attr, [](auto& realm) -> JS::Value { return &ensure_web_constructor<@prototype_class@>(realm, "@legacy_interface_name@"_fly_string); });)~~~");
|
||||
}
|
||||
};
|
||||
|
||||
@ -348,7 +348,7 @@ void add_@global_object_snake_name@_exposed_interfaces(JS::Object& global)
|
||||
gen.set("namespace_class", namespace_class);
|
||||
|
||||
gen.append(R"~~~(
|
||||
global.define_intrinsic_accessor("@interface_name@", attr, [](auto& realm) -> JS::Value { return &ensure_web_namespace<@namespace_class@>(realm, "@interface_name@"sv); });)~~~");
|
||||
global.define_intrinsic_accessor("@interface_name@", attr, [](auto& realm) -> JS::Value { return &ensure_web_namespace<@namespace_class@>(realm, "@interface_name@"_fly_string); });)~~~");
|
||||
};
|
||||
|
||||
for (auto& interface : exposed_interfaces) {
|
||||
|
@ -622,7 +622,7 @@ Animation::Animation(JS::Realm& realm)
|
||||
void Animation::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AnimationPrototype>(realm, "Animation"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AnimationPrototype>(realm, "Animation"_fly_string));
|
||||
}
|
||||
|
||||
void Animation::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -497,7 +497,7 @@ AnimationEffect::AnimationEffect(JS::Realm& realm)
|
||||
void AnimationEffect::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AnimationEffectPrototype>(realm, "AnimationEffect"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AnimationEffectPrototype>(realm, "AnimationEffect"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ AnimationPlaybackEvent::AnimationPlaybackEvent(JS::Realm& realm, FlyString const
|
||||
void AnimationPlaybackEvent::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AnimationPlaybackEventPrototype>(realm, "AnimationPlaybackEvent"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AnimationPlaybackEventPrototype>(realm, "AnimationPlaybackEvent"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ AnimationTimeline::~AnimationTimeline()
|
||||
void AnimationTimeline::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AnimationTimelinePrototype>(realm, "AnimationTimeline"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AnimationTimelinePrototype>(realm, "AnimationTimeline"_fly_string));
|
||||
}
|
||||
|
||||
void AnimationTimeline::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -76,7 +76,7 @@ DocumentTimeline::DocumentTimeline(JS::Realm& realm, DOM::Document& document, Hi
|
||||
void DocumentTimeline::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentTimelinePrototype>(realm, "DocumentTimeline"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentTimelinePrototype>(realm, "DocumentTimeline"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ KeyframeEffect::KeyframeEffect(JS::Realm& realm)
|
||||
void KeyframeEffect::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::KeyframeEffectPrototype>(realm, "KeyframeEffect"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::KeyframeEffectPrototype>(realm, "KeyframeEffect"_fly_string));
|
||||
}
|
||||
|
||||
void KeyframeEffect::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -24,7 +24,7 @@ void AudioConstructor::initialize(JS::Realm& realm)
|
||||
auto& vm = this->vm();
|
||||
Base::initialize(realm);
|
||||
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLAudioElementPrototype>(realm, "HTMLAudioElement"), 0);
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLAudioElementPrototype>(realm, "HTMLAudioElement"_fly_string), 0);
|
||||
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ void ImageConstructor::initialize(JS::Realm& realm)
|
||||
auto& vm = this->vm();
|
||||
Base::initialize(realm);
|
||||
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLImageElementPrototype>(realm, "HTMLImageElement"), 0);
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLImageElementPrototype>(realm, "HTMLImageElement"_fly_string), 0);
|
||||
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibJS/Forward.h>
|
||||
@ -27,7 +28,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename NamespaceType>
|
||||
JS::Object& ensure_web_namespace(DeprecatedString const& namespace_name)
|
||||
JS::Object& ensure_web_namespace(FlyString const& namespace_name)
|
||||
{
|
||||
if (auto it = m_namespaces.find(namespace_name); it != m_namespaces.end())
|
||||
return *it->value;
|
||||
@ -37,7 +38,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename PrototypeType>
|
||||
JS::Object& ensure_web_prototype(DeprecatedString const& class_name)
|
||||
JS::Object& ensure_web_prototype(FlyString const& class_name)
|
||||
{
|
||||
if (auto it = m_prototypes.find(class_name); it != m_prototypes.end())
|
||||
return *it->value;
|
||||
@ -47,7 +48,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename PrototypeType>
|
||||
JS::NativeFunction& ensure_web_constructor(DeprecatedString const& class_name)
|
||||
JS::NativeFunction& ensure_web_constructor(FlyString const& class_name)
|
||||
{
|
||||
if (auto it = m_constructors.find(class_name); it != m_constructors.end())
|
||||
return *it->value;
|
||||
@ -65,9 +66,9 @@ private:
|
||||
template<typename PrototypeType>
|
||||
void create_web_prototype_and_constructor(JS::Realm& realm);
|
||||
|
||||
HashMap<DeprecatedString, JS::NonnullGCPtr<JS::Object>> m_namespaces;
|
||||
HashMap<DeprecatedString, JS::NonnullGCPtr<JS::Object>> m_prototypes;
|
||||
HashMap<DeprecatedString, JS::GCPtr<JS::NativeFunction>> m_constructors;
|
||||
HashMap<FlyString, JS::NonnullGCPtr<JS::Object>> m_namespaces;
|
||||
HashMap<FlyString, JS::NonnullGCPtr<JS::Object>> m_prototypes;
|
||||
HashMap<FlyString, JS::GCPtr<JS::NativeFunction>> m_constructors;
|
||||
JS::NonnullGCPtr<JS::Realm> m_realm;
|
||||
};
|
||||
|
||||
@ -77,19 +78,19 @@ private:
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
[[nodiscard]] JS::Object& ensure_web_namespace(JS::Realm& realm, DeprecatedString const& namespace_name)
|
||||
[[nodiscard]] JS::Object& ensure_web_namespace(JS::Realm& realm, FlyString const& namespace_name)
|
||||
{
|
||||
return host_defined_intrinsics(realm).ensure_web_namespace<T>(namespace_name);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
[[nodiscard]] JS::Object& ensure_web_prototype(JS::Realm& realm, DeprecatedString const& class_name)
|
||||
[[nodiscard]] JS::Object& ensure_web_prototype(JS::Realm& realm, FlyString const& class_name)
|
||||
{
|
||||
return host_defined_intrinsics(realm).ensure_web_prototype<T>(class_name);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
[[nodiscard]] JS::NativeFunction& ensure_web_constructor(JS::Realm& realm, DeprecatedString const& class_name)
|
||||
[[nodiscard]] JS::NativeFunction& ensure_web_constructor(JS::Realm& realm, FlyString const& class_name)
|
||||
{
|
||||
return host_defined_intrinsics(realm).ensure_web_constructor<T>(class_name);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ void OptionConstructor::initialize(JS::Realm& realm)
|
||||
auto& vm = this->vm();
|
||||
Base::initialize(realm);
|
||||
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLOptionElementPrototype>(realm, "HTMLOptionElement"), 0);
|
||||
define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::HTMLOptionElementPrototype>(realm, "HTMLOptionElement"_fly_string), 0);
|
||||
define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ void CSSConditionRule::for_each_effective_keyframes_at_rule(Function<void(CSSKey
|
||||
void CSSConditionRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSConditionRulePrototype>(realm, "CSSConditionRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSConditionRulePrototype>(realm, "CSSConditionRule"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ CSSFontFaceRule::CSSFontFaceRule(JS::Realm& realm, FontFace&& font_face)
|
||||
void CSSFontFaceRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSFontFaceRulePrototype>(realm, "CSSFontFaceRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSFontFaceRulePrototype>(realm, "CSSFontFaceRule"_fly_string));
|
||||
}
|
||||
|
||||
CSSStyleDeclaration* CSSFontFaceRule::style()
|
||||
|
@ -25,7 +25,7 @@ CSSGroupingRule::CSSGroupingRule(JS::Realm& realm, CSSRuleList& rules)
|
||||
void CSSGroupingRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSGroupingRulePrototype>(realm, "CSSGroupingRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSGroupingRulePrototype>(realm, "CSSGroupingRule"_fly_string));
|
||||
}
|
||||
|
||||
void CSSGroupingRule::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -45,7 +45,7 @@ CSSImportRule::CSSImportRule(AK::URL url, DOM::Document& document)
|
||||
void CSSImportRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSImportRulePrototype>(realm, "CSSImportRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSImportRulePrototype>(realm, "CSSImportRule"_fly_string));
|
||||
}
|
||||
|
||||
void CSSImportRule::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -27,7 +27,7 @@ void CSSKeyframeRule::visit_edges(Visitor& visitor)
|
||||
void CSSKeyframeRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSKeyframeRulePrototype>(realm, "CSSKeyframeRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSKeyframeRulePrototype>(realm, "CSSKeyframeRule"_fly_string));
|
||||
}
|
||||
|
||||
String CSSKeyframeRule::serialized() const
|
||||
|
@ -27,7 +27,7 @@ void CSSKeyframesRule::visit_edges(Visitor& visitor)
|
||||
void CSSKeyframesRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSKeyframesRulePrototype>(realm, "CSSKeyframesRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSKeyframesRulePrototype>(realm, "CSSKeyframesRule"_fly_string));
|
||||
}
|
||||
|
||||
String CSSKeyframesRule::serialized() const
|
||||
|
@ -28,7 +28,7 @@ CSSMediaRule::CSSMediaRule(JS::Realm& realm, MediaList& media, CSSRuleList& rule
|
||||
void CSSMediaRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSMediaRulePrototype>(realm, "CSSMediaRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSMediaRulePrototype>(realm, "CSSMediaRule"_fly_string));
|
||||
}
|
||||
|
||||
void CSSMediaRule::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -31,7 +31,7 @@ JS::NonnullGCPtr<CSSNamespaceRule> CSSNamespaceRule::create(JS::Realm& realm, Op
|
||||
void CSSNamespaceRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSNamespaceRulePrototype>(realm, "CSSNamespaceRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSNamespaceRulePrototype>(realm, "CSSNamespaceRule"_fly_string));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom/#serialize-a-css-rule
|
||||
|
@ -41,7 +41,7 @@ JS::NonnullGCPtr<CSSRuleList> CSSRuleList::create_empty(JS::Realm& realm)
|
||||
void CSSRuleList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSRuleListPrototype>(realm, "CSSRuleList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSRuleListPrototype>(realm, "CSSRuleList"_fly_string));
|
||||
}
|
||||
|
||||
void CSSRuleList::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -28,7 +28,7 @@ CSSStyleDeclaration::CSSStyleDeclaration(JS::Realm& realm)
|
||||
void CSSStyleDeclaration::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSStyleDeclarationPrototype>(realm, "CSSStyleDeclaration"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSStyleDeclarationPrototype>(realm, "CSSStyleDeclaration"_fly_string));
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<PropertyOwningCSSStyleDeclaration> PropertyOwningCSSStyleDeclaration::create(JS::Realm& realm, Vector<StyleProperty> properties, HashMap<FlyString, StyleProperty> custom_properties)
|
||||
|
@ -29,7 +29,7 @@ CSSStyleRule::CSSStyleRule(JS::Realm& realm, Vector<NonnullRefPtr<Selector>>&& s
|
||||
void CSSStyleRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSStyleRulePrototype>(realm, "CSSStyleRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSStyleRulePrototype>(realm, "CSSStyleRule"_fly_string));
|
||||
}
|
||||
|
||||
void CSSStyleRule::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -42,7 +42,7 @@ CSSStyleSheet::CSSStyleSheet(JS::Realm& realm, CSSRuleList& rules, MediaList& me
|
||||
void CSSStyleSheet::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSStyleSheetPrototype>(realm, "CSSStyleSheet"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSStyleSheetPrototype>(realm, "CSSStyleSheet"_fly_string));
|
||||
}
|
||||
|
||||
void CSSStyleSheet::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -27,7 +27,7 @@ CSSSupportsRule::CSSSupportsRule(JS::Realm& realm, NonnullRefPtr<Supports>&& sup
|
||||
void CSSSupportsRule::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSSupportsRulePrototype>(realm, "CSSSupportsRule"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSSupportsRulePrototype>(realm, "CSSSupportsRule"_fly_string));
|
||||
}
|
||||
|
||||
String CSSSupportsRule::condition_text() const
|
||||
|
@ -29,7 +29,7 @@ MediaList::MediaList(JS::Realm& realm, Vector<NonnullRefPtr<MediaQuery>>&& media
|
||||
void MediaList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaListPrototype>(realm, "MediaList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaListPrototype>(realm, "MediaList"_fly_string));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom-1/#dom-medialist-mediatext
|
||||
|
@ -33,7 +33,7 @@ MediaQueryList::MediaQueryList(DOM::Document& document, Vector<NonnullRefPtr<Med
|
||||
void MediaQueryList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaQueryListPrototype>(realm, "MediaQueryList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaQueryListPrototype>(realm, "MediaQueryList"_fly_string));
|
||||
}
|
||||
|
||||
void MediaQueryList::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -29,7 +29,7 @@ MediaQueryListEvent::~MediaQueryListEvent() = default;
|
||||
void MediaQueryListEvent::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaQueryListEventPrototype>(realm, "MediaQueryListEvent"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaQueryListEventPrototype>(realm, "MediaQueryListEvent"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ Screen::Screen(HTML::Window& window)
|
||||
void Screen::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ScreenPrototype>(realm, "Screen"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ScreenPrototype>(realm, "Screen"_fly_string));
|
||||
}
|
||||
|
||||
void Screen::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -79,7 +79,7 @@ StyleSheetList::StyleSheetList(DOM::Document& document)
|
||||
void StyleSheetList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::StyleSheetListPrototype>(realm, "StyleSheetList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::StyleSheetListPrototype>(realm, "StyleSheetList"_fly_string));
|
||||
}
|
||||
|
||||
void StyleSheetList::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -31,7 +31,7 @@ VisualViewport::VisualViewport(DOM::Document& document)
|
||||
void VisualViewport::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::VisualViewportPrototype>(realm, "VisualViewport"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::VisualViewportPrototype>(realm, "VisualViewport"_fly_string));
|
||||
}
|
||||
|
||||
void VisualViewport::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -36,7 +36,7 @@ Clipboard::~Clipboard() = default;
|
||||
void Clipboard::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ClipboardPrototype>(realm, "Clipboard"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ClipboardPrototype>(realm, "Clipboard"_fly_string));
|
||||
}
|
||||
|
||||
// https://w3c.github.io/clipboard-apis/#os-specific-well-known-format
|
||||
|
@ -33,7 +33,7 @@ Crypto::~Crypto() = default;
|
||||
void Crypto::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CryptoPrototype>(realm, "Crypto"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CryptoPrototype>(realm, "Crypto"_fly_string));
|
||||
m_subtle = SubtleCrypto::create(realm);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ SubtleCrypto::~SubtleCrypto() = default;
|
||||
void SubtleCrypto::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::SubtleCryptoPrototype>(realm, "SubtleCrypto"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::SubtleCryptoPrototype>(realm, "SubtleCrypto"_fly_string));
|
||||
}
|
||||
|
||||
// https://w3c.github.io/webcrypto/#dfn-SubtleCrypto-method-digest
|
||||
|
@ -30,7 +30,7 @@ AbortController::~AbortController() = default;
|
||||
void AbortController::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbortControllerPrototype>(realm, "AbortController"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbortControllerPrototype>(realm, "AbortController"_fly_string));
|
||||
}
|
||||
|
||||
void AbortController::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -27,7 +27,7 @@ AbortSignal::AbortSignal(JS::Realm& realm)
|
||||
void AbortSignal::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbortSignalPrototype>(realm, "AbortSignal"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbortSignalPrototype>(realm, "AbortSignal"_fly_string));
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#abortsignal-add
|
||||
|
@ -24,7 +24,7 @@ AbstractRange::~AbstractRange() = default;
|
||||
void AbstractRange::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbstractRangePrototype>(realm, "AbstractRange"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbstractRangePrototype>(realm, "AbstractRange"_fly_string));
|
||||
}
|
||||
|
||||
void AbstractRange::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -43,7 +43,7 @@ Attr::Attr(Document& document, QualifiedName qualified_name, String value, Eleme
|
||||
void Attr::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AttrPrototype>(realm, "Attr"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AttrPrototype>(realm, "Attr"_fly_string));
|
||||
}
|
||||
|
||||
void Attr::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -21,7 +21,7 @@ CDATASection::~CDATASection() = default;
|
||||
void CDATASection::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CDATASectionPrototype>(realm, "CDATASection"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CDATASectionPrototype>(realm, "CDATASection"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ CharacterData::CharacterData(Document& document, NodeType type, String const& da
|
||||
void CharacterData::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CharacterDataPrototype>(realm, "CharacterData"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CharacterDataPrototype>(realm, "CharacterData"_fly_string));
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-characterdata-data
|
||||
|
@ -28,7 +28,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Comment>> Comment::construct_impl(JS::Realm
|
||||
void Comment::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CommentPrototype>(realm, "Comment"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CommentPrototype>(realm, "Comment"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ CustomEvent::~CustomEvent() = default;
|
||||
void CustomEvent::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CustomEventPrototype>(realm, "CustomEvent"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CustomEventPrototype>(realm, "CustomEvent"_fly_string));
|
||||
}
|
||||
|
||||
void CustomEvent::visit_edges(JS::Cell::Visitor& visitor)
|
||||
|
@ -36,7 +36,7 @@ DOMImplementation::~DOMImplementation() = default;
|
||||
void DOMImplementation::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMImplementationPrototype>(realm, "DOMImplementation"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMImplementationPrototype>(realm, "DOMImplementation"_fly_string));
|
||||
}
|
||||
|
||||
void DOMImplementation::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -73,7 +73,7 @@ DOMTokenList::DOMTokenList(Element& associated_element, FlyString associated_att
|
||||
void DOMTokenList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMTokenListPrototype>(realm, "DOMTokenList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMTokenListPrototype>(realm, "DOMTokenList"_fly_string));
|
||||
}
|
||||
|
||||
void DOMTokenList::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -344,7 +344,7 @@ Document::~Document()
|
||||
void Document::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentPrototype>(realm, "Document"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentPrototype>(realm, "Document"_fly_string));
|
||||
|
||||
m_selection = heap().allocate<Selection::Selection>(realm, realm, *this);
|
||||
|
||||
|
@ -19,7 +19,7 @@ DocumentFragment::DocumentFragment(Document& document)
|
||||
void DocumentFragment::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentFragmentPrototype>(realm, "DocumentFragment"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentFragmentPrototype>(realm, "DocumentFragment"_fly_string));
|
||||
}
|
||||
|
||||
void DocumentFragment::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -24,7 +24,7 @@ DocumentType::DocumentType(Document& document)
|
||||
void DocumentType::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentTypePrototype>(realm, "DocumentType"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DocumentTypePrototype>(realm, "DocumentType"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ Element::~Element() = default;
|
||||
void Element::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ElementPrototype>(realm, "Element"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ElementPrototype>(realm, "Element"_fly_string));
|
||||
|
||||
m_attributes = NamedNodeMap::create(*this);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ Event::Event(JS::Realm& realm, FlyString const& type, EventInit const& event_ini
|
||||
void Event::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::EventPrototype>(realm, "Event"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::EventPrototype>(realm, "Event"_fly_string));
|
||||
}
|
||||
|
||||
void Event::visit_edges(Visitor& visitor)
|
||||
|
@ -59,7 +59,7 @@ void EventTarget::initialize(JS::Realm& realm)
|
||||
// FIXME: We can't do this for HTML::Window or HTML::WorkerGlobalScope, as this will run when creating the initial global object.
|
||||
// During this time, the ESO is not setup, so it will cause a nullptr dereference in host_defined_intrinsics.
|
||||
if (!is<HTML::WindowOrWorkerGlobalScopeMixin>(this))
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::EventTargetPrototype>(realm, "EventTarget"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::EventTargetPrototype>(realm, "EventTarget"_fly_string));
|
||||
}
|
||||
|
||||
void EventTarget::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -33,7 +33,7 @@ HTMLCollection::~HTMLCollection() = default;
|
||||
void HTMLCollection::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLCollectionPrototype>(realm, "HTMLCollection"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLCollectionPrototype>(realm, "HTMLCollection"_fly_string));
|
||||
}
|
||||
|
||||
void HTMLCollection::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -29,7 +29,7 @@ HTMLFormControlsCollection::~HTMLFormControlsCollection() = default;
|
||||
void HTMLFormControlsCollection::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLFormControlsCollectionPrototype>(realm, "HTMLFormControlsCollection"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLFormControlsCollectionPrototype>(realm, "HTMLFormControlsCollection"_fly_string));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlformcontrolscollection-nameditem
|
||||
|
@ -42,7 +42,7 @@ MutationObserver::~MutationObserver()
|
||||
void MutationObserver::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MutationObserverPrototype>(realm, "MutationObserver"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MutationObserverPrototype>(realm, "MutationObserver"_fly_string));
|
||||
}
|
||||
|
||||
void MutationObserver::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -38,7 +38,7 @@ MutationRecord::~MutationRecord() = default;
|
||||
void MutationRecord::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MutationRecordPrototype>(realm, "MutationRecord"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MutationRecordPrototype>(realm, "MutationRecord"_fly_string));
|
||||
}
|
||||
|
||||
void MutationRecord::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -31,7 +31,7 @@ NamedNodeMap::NamedNodeMap(Element& element)
|
||||
void NamedNodeMap::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NamedNodeMapPrototype>(realm, "NamedNodeMap"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NamedNodeMapPrototype>(realm, "NamedNodeMap"_fly_string));
|
||||
}
|
||||
|
||||
void NamedNodeMap::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -26,7 +26,7 @@ NodeIterator::~NodeIterator() = default;
|
||||
void NodeIterator::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeIteratorPrototype>(realm, "NodeIterator"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeIteratorPrototype>(realm, "NodeIterator"_fly_string));
|
||||
}
|
||||
|
||||
void NodeIterator::finalize()
|
||||
|
@ -20,7 +20,7 @@ NodeList::~NodeList() = default;
|
||||
void NodeList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeListPrototype>(realm, "NodeList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeListPrototype>(realm, "NodeList"_fly_string));
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<JS::Value> NodeList::item_value(size_t index) const
|
||||
|
@ -22,7 +22,7 @@ ProcessingInstruction::ProcessingInstruction(Document& document, DeprecatedStrin
|
||||
void ProcessingInstruction::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ProcessingInstructionPrototype>(realm, "ProcessingInstruction"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ProcessingInstructionPrototype>(realm, "ProcessingInstruction"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ RadioNodeList::~RadioNodeList() = default;
|
||||
void RadioNodeList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RadioNodeListPrototype>(realm, "RadioNodeList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RadioNodeListPrototype>(realm, "RadioNodeList"_fly_string));
|
||||
}
|
||||
|
||||
static HTML::HTMLInputElement const* radio_button(Node const& node)
|
||||
|
@ -75,7 +75,7 @@ Range::~Range()
|
||||
void Range::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RangePrototype>(realm, "Range"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RangePrototype>(realm, "Range"_fly_string));
|
||||
}
|
||||
|
||||
void Range::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -24,7 +24,7 @@ ShadowRoot::ShadowRoot(Document& document, Element& host, Bindings::ShadowRootMo
|
||||
void ShadowRoot::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ShadowRootPrototype>(realm, "ShadowRoot"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ShadowRootPrototype>(realm, "ShadowRoot"_fly_string));
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#ref-for-get-the-parent%E2%91%A6
|
||||
|
@ -40,7 +40,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<StaticRange>> StaticRange::construct_impl(J
|
||||
void StaticRange::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::StaticRangePrototype>(realm, "StaticRange"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::StaticRangePrototype>(realm, "StaticRange"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ Text::Text(Document& document, NodeType type, String const& data)
|
||||
void Text::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TextPrototype>(realm, "Text"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TextPrototype>(realm, "Text"_fly_string));
|
||||
}
|
||||
|
||||
void Text::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -27,7 +27,7 @@ TreeWalker::~TreeWalker() = default;
|
||||
void TreeWalker::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TreeWalkerPrototype>(realm, "TreeWalker"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TreeWalkerPrototype>(realm, "TreeWalker"_fly_string));
|
||||
}
|
||||
|
||||
void TreeWalker::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -24,7 +24,7 @@ XMLDocument::XMLDocument(JS::Realm& realm, AK::URL const& url)
|
||||
void XMLDocument::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::XMLDocumentPrototype>(realm, "XMLDocument"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::XMLDocumentPrototype>(realm, "XMLDocument"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ XMLSerializer::~XMLSerializer() = default;
|
||||
void XMLSerializer::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::XMLSerializerPrototype>(realm, "XMLSerializer"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::XMLSerializerPrototype>(realm, "XMLSerializer"_fly_string));
|
||||
}
|
||||
|
||||
// https://w3c.github.io/DOM-Parsing/#dom-xmlserializer-serializetostring
|
||||
|
@ -41,7 +41,7 @@ TextDecoder::~TextDecoder() = default;
|
||||
void TextDecoder::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TextDecoderPrototype>(realm, "TextDecoder"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TextDecoderPrototype>(realm, "TextDecoder"_fly_string));
|
||||
}
|
||||
|
||||
// https://encoding.spec.whatwg.org/#dom-textdecoder-decode
|
||||
|
@ -28,7 +28,7 @@ TextEncoder::~TextEncoder() = default;
|
||||
void TextEncoder::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TextEncoderPrototype>(realm, "TextEncoder"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::TextEncoderPrototype>(realm, "TextEncoder"_fly_string));
|
||||
}
|
||||
|
||||
// https://encoding.spec.whatwg.org/#dom-textencoder-encode
|
||||
|
@ -42,7 +42,7 @@ Headers::~Headers() = default;
|
||||
void Headers::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HeadersPrototype>(realm, "Headers"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HeadersPrototype>(realm, "Headers"_fly_string));
|
||||
}
|
||||
|
||||
void Headers::visit_edges(JS::Cell::Visitor& visitor)
|
||||
|
@ -16,7 +16,7 @@ template<>
|
||||
void Intrinsics::create_web_prototype_and_constructor<HeadersIteratorPrototype>(JS::Realm& realm)
|
||||
{
|
||||
auto prototype = heap().allocate<HeadersIteratorPrototype>(realm, realm);
|
||||
m_prototypes.set("HeadersIterator"sv, prototype);
|
||||
m_prototypes.set("HeadersIterator"_fly_string, prototype);
|
||||
}
|
||||
|
||||
}
|
||||
@ -42,7 +42,7 @@ HeadersIterator::~HeadersIterator() = default;
|
||||
void HeadersIterator::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HeadersIteratorPrototype>(realm, "HeadersIterator"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HeadersIteratorPrototype>(realm, "HeadersIterator"_fly_string));
|
||||
}
|
||||
|
||||
void HeadersIterator::visit_edges(JS::Cell::Visitor& visitor)
|
||||
|
@ -34,7 +34,7 @@ Request::~Request() = default;
|
||||
void Request::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RequestPrototype>(realm, "Request"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::RequestPrototype>(realm, "Request"_fly_string));
|
||||
}
|
||||
|
||||
void Request::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -31,7 +31,7 @@ Response::~Response() = default;
|
||||
void Response::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ResponsePrototype>(realm, "Response"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ResponsePrototype>(realm, "Response"_fly_string));
|
||||
}
|
||||
|
||||
void Response::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -145,7 +145,7 @@ Blob::~Blob() = default;
|
||||
void Blob::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::BlobPrototype>(realm, "Blob"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::BlobPrototype>(realm, "Blob"_fly_string));
|
||||
}
|
||||
|
||||
// https://w3c.github.io/FileAPI/#ref-for-dom-blob-blob
|
||||
|
@ -24,7 +24,7 @@ File::File(JS::Realm& realm, ByteBuffer byte_buffer, String file_name, String ty
|
||||
void File::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FilePrototype>(realm, "File"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FilePrototype>(realm, "File"_fly_string));
|
||||
}
|
||||
|
||||
File::~File() = default;
|
||||
|
@ -27,7 +27,7 @@ FileList::~FileList() = default;
|
||||
void FileList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FileListPrototype>(realm, "FileList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FileListPrototype>(realm, "FileList"_fly_string));
|
||||
}
|
||||
|
||||
// https://w3c.github.io/FileAPI/#dfn-item
|
||||
|
@ -42,7 +42,7 @@ FileReader::FileReader(JS::Realm& realm)
|
||||
void FileReader::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FileReaderPrototype>(realm, "FileReader"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FileReaderPrototype>(realm, "FileReader"_fly_string));
|
||||
}
|
||||
|
||||
void FileReader::visit_edges(JS::Cell::Visitor& visitor)
|
||||
|
@ -99,7 +99,7 @@ DOMMatrix::~DOMMatrix() = default;
|
||||
void DOMMatrix::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMMatrixPrototype>(realm, "DOMMatrix"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMMatrixPrototype>(realm, "DOMMatrix"_fly_string));
|
||||
}
|
||||
|
||||
// https://drafts.fxtf.org/geometry/#dom-dommatrix-frommatrix
|
||||
|
@ -133,7 +133,7 @@ DOMMatrixReadOnly::~DOMMatrixReadOnly() = default;
|
||||
void DOMMatrixReadOnly::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMMatrixReadOnlyPrototype>(realm, "DOMMatrixReadOnly"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMMatrixReadOnlyPrototype>(realm, "DOMMatrixReadOnly"_fly_string));
|
||||
}
|
||||
|
||||
// https://drafts.fxtf.org/geometry/#create-a-2d-matrix
|
||||
|
@ -34,7 +34,7 @@ DOMPoint::~DOMPoint() = default;
|
||||
void DOMPoint::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMPointPrototype>(realm, "DOMPoint"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMPointPrototype>(realm, "DOMPoint"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMPoint>> DOMPointReadOnly::matrix_transfo
|
||||
void DOMPointReadOnly::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMPointReadOnlyPrototype>(realm, "DOMPointReadOnly"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMPointReadOnlyPrototype>(realm, "DOMPointReadOnly"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ JS::NonnullGCPtr<DOMRect> DOMQuad::get_bounds() const
|
||||
void DOMQuad::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMQuadPrototype>(realm, "DOMQuad"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMQuadPrototype>(realm, "DOMQuad"_fly_string));
|
||||
}
|
||||
|
||||
void DOMQuad::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -39,7 +39,7 @@ DOMRect::~DOMRect() = default;
|
||||
void DOMRect::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMRectPrototype>(realm, "DOMRect"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMRectPrototype>(realm, "DOMRect"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ DOMRectList::~DOMRectList() = default;
|
||||
void DOMRectList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMRectListPrototype>(realm, "DOMRectList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMRectListPrototype>(realm, "DOMRectList"_fly_string));
|
||||
}
|
||||
|
||||
// https://drafts.fxtf.org/geometry-1/#dom-domrectlist-length
|
||||
|
@ -35,7 +35,7 @@ DOMRectReadOnly::~DOMRectReadOnly() = default;
|
||||
void DOMRectReadOnly::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMRectReadOnlyPrototype>(realm, "DOMRectReadOnly"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMRectReadOnlyPrototype>(realm, "DOMRectReadOnly"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ AudioTrack::~AudioTrack()
|
||||
void AudioTrack::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AudioTrackPrototype>(realm, "AudioTrack"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AudioTrackPrototype>(realm, "AudioTrack"_fly_string));
|
||||
|
||||
auto id = s_audio_track_id_allocator.allocate();
|
||||
m_id = MUST(String::number(id));
|
||||
|
@ -24,7 +24,7 @@ AudioTrackList::AudioTrackList(JS::Realm& realm)
|
||||
void AudioTrackList::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AudioTrackListPrototype>(realm, "AudioTrackList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AudioTrackListPrototype>(realm, "AudioTrackList"_fly_string));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/media.html#dom-tracklist-item
|
||||
|
@ -52,7 +52,7 @@ CanvasGradient::~CanvasGradient() = default;
|
||||
void CanvasGradient::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CanvasGradientPrototype>(realm, "CanvasGradient"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CanvasGradientPrototype>(realm, "CanvasGradient"_fly_string));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/canvas.html#dom-canvasgradient-addcolorstop
|
||||
|
@ -138,7 +138,7 @@ WebIDL::ExceptionOr<JS::GCPtr<CanvasPattern>> CanvasPattern::create(JS::Realm& r
|
||||
void CanvasPattern::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CanvasPatternPrototype>(realm, "CanvasPattern"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CanvasPatternPrototype>(realm, "CanvasPattern"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ CanvasRenderingContext2D::~CanvasRenderingContext2D() = default;
|
||||
void CanvasRenderingContext2D::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CanvasRenderingContext2DPrototype>(realm, "CanvasRenderingContext2D"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CanvasRenderingContext2DPrototype>(realm, "CanvasRenderingContext2D"_fly_string));
|
||||
}
|
||||
|
||||
void CanvasRenderingContext2D::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -34,7 +34,7 @@ CloseEvent::~CloseEvent() = default;
|
||||
void CloseEvent::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CloseEventPrototype>(realm, "CloseEvent"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CloseEventPrototype>(realm, "CloseEvent"_fly_string));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ CustomElementRegistry::~CustomElementRegistry() = default;
|
||||
void CustomElementRegistry::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CustomElementRegistryPrototype>(realm, "CustomElementRegistry"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::CustomElementRegistryPrototype>(realm, "CustomElementRegistry"_fly_string));
|
||||
}
|
||||
|
||||
// https://webidl.spec.whatwg.org/#es-callback-function
|
||||
|
@ -32,7 +32,7 @@ DOMParser::~DOMParser() = default;
|
||||
void DOMParser::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMParserPrototype>(realm, "DOMParser"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMParserPrototype>(realm, "DOMParser"_fly_string));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring
|
||||
|
@ -31,7 +31,7 @@ DOMStringMap::~DOMStringMap() = default;
|
||||
void DOMStringMap::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMStringMapPrototype>(realm, "DOMStringMap"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::DOMStringMapPrototype>(realm, "DOMStringMap"_fly_string));
|
||||
}
|
||||
|
||||
void DOMStringMap::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -36,7 +36,7 @@ ErrorEvent::~ErrorEvent() = default;
|
||||
void ErrorEvent::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ErrorEventPrototype>(realm, "ErrorEvent"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::ErrorEventPrototype>(realm, "ErrorEvent"_fly_string));
|
||||
}
|
||||
|
||||
void ErrorEvent::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -28,7 +28,7 @@ FormDataEvent::~FormDataEvent() = default;
|
||||
void FormDataEvent::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FormDataEventPrototype>(realm, "FormDataEvent"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::FormDataEventPrototype>(realm, "FormDataEvent"_fly_string));
|
||||
}
|
||||
|
||||
void FormDataEvent::visit_edges(Cell::Visitor& visitor)
|
||||
|
@ -23,7 +23,7 @@ HTMLAnchorElement::~HTMLAnchorElement() = default;
|
||||
void HTMLAnchorElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLAnchorElementPrototype>(realm, "HTMLAnchorElement"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLAnchorElementPrototype>(realm, "HTMLAnchorElement"_fly_string));
|
||||
}
|
||||
|
||||
void HTMLAnchorElement::attribute_changed(FlyString const& name, Optional<String> const& value)
|
||||
|
@ -22,7 +22,7 @@ HTMLAreaElement::~HTMLAreaElement() = default;
|
||||
void HTMLAreaElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLAreaElementPrototype>(realm, "HTMLAreaElement"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLAreaElementPrototype>(realm, "HTMLAreaElement"_fly_string));
|
||||
}
|
||||
|
||||
void HTMLAreaElement::attribute_changed(FlyString const& name, Optional<String> const& value)
|
||||
|
@ -24,7 +24,7 @@ HTMLAudioElement::~HTMLAudioElement() = default;
|
||||
void HTMLAudioElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLAudioElementPrototype>(realm, "HTMLAudioElement"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLAudioElementPrototype>(realm, "HTMLAudioElement"_fly_string));
|
||||
}
|
||||
|
||||
JS::GCPtr<Layout::Node> HTMLAudioElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
|
||||
|
@ -22,7 +22,7 @@ HTMLBRElement::~HTMLBRElement() = default;
|
||||
void HTMLBRElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLBRElementPrototype>(realm, "HTMLBRElement"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLBRElementPrototype>(realm, "HTMLBRElement"_fly_string));
|
||||
}
|
||||
|
||||
JS::GCPtr<Layout::Node> HTMLBRElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
|
||||
|
@ -21,7 +21,7 @@ HTMLBaseElement::~HTMLBaseElement() = default;
|
||||
void HTMLBaseElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLBaseElementPrototype>(realm, "HTMLBaseElement"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLBaseElementPrototype>(realm, "HTMLBaseElement"_fly_string));
|
||||
}
|
||||
|
||||
void HTMLBaseElement::inserted()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user