mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:47:46 +00:00
parent
b7b02693b9
commit
1a27c525d5
69 changed files with 185 additions and 198 deletions
|
@ -2682,7 +2682,7 @@ void @class_name@::initialize(JS::Realm& realm)
|
|||
}
|
||||
|
||||
generator.append(R"~~~(
|
||||
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST(JS::PrimitiveString::create(vm, "@namespaced_name@"sv)), JS::Attribute::Configurable);
|
||||
define_direct_property(vm.well_known_symbol_to_string_tag(), JS::PrimitiveString::create(vm, "@namespaced_name@"_string), JS::Attribute::Configurable);
|
||||
)~~~");
|
||||
|
||||
if (!is_global_interface) {
|
||||
|
@ -3888,7 +3888,7 @@ void @prototype_class@::initialize(JS::Realm& realm)
|
|||
auto& vm = this->vm();
|
||||
Base::initialize(realm);
|
||||
define_native_function(realm, vm.names.next, next, 0, JS::Attribute::Writable | JS::Attribute::Enumerable | JS::Attribute::Configurable);
|
||||
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST(JS::PrimitiveString::create(vm, "Iterator"sv)), JS::Attribute::Configurable);
|
||||
define_direct_property(vm.well_known_symbol_to_string_tag(), JS::PrimitiveString::create(vm, "Iterator"_string), JS::Attribute::Configurable);
|
||||
}
|
||||
|
||||
static JS::ThrowCompletionOr<@fully_qualified_name@*> impl_from(JS::VM& vm)
|
||||
|
|
|
@ -196,7 +196,7 @@ void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Rea
|
|||
m_constructors.set("@interface_name@"sv, 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@"sv).release_allocated_value_but_fixme_should_propagate_errors(), JS::Attribute::Configurable);
|
||||
constructor->define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "@interface_name@"_string), JS::Attribute::Configurable);
|
||||
)~~~");
|
||||
|
||||
if (legacy_constructor.has_value()) {
|
||||
|
@ -206,7 +206,7 @@ void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Rea
|
|||
auto legacy_constructor = heap().allocate<@legacy_constructor_class@>(realm, realm).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
m_constructors.set("@legacy_interface_name@"sv, legacy_constructor);
|
||||
|
||||
legacy_constructor->define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "@legacy_interface_name@"sv).release_allocated_value_but_fixme_should_propagate_errors(), JS::Attribute::Configurable);)~~~");
|
||||
legacy_constructor->define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "@legacy_interface_name@"_string), JS::Attribute::Configurable);)~~~");
|
||||
}
|
||||
|
||||
gen.append(R"~~~(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue