mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 09:18:05 +03:00
LibJS: Make ArrayBuffer.prototype.byteLength an accessor
This commit is contained in:
parent
c6c0c6a61a
commit
83d3175b13
Notes:
sideshowbarker
2024-07-18 12:17:28 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/83d3175b131 Pull-request: https://github.com/SerenityOS/serenity/pull/8042 Reviewed-by: https://github.com/IdanHo ✅
@ -24,8 +24,7 @@ void ArrayBufferPrototype::initialize(GlobalObject& global_object)
|
||||
Object::initialize(global_object);
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.slice, slice, 2, attr);
|
||||
// FIXME: This should be an accessor property
|
||||
define_native_property(vm.names.byteLength, byte_length_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(vm.names.byteLength, byte_length_getter, {}, Attribute::Configurable);
|
||||
|
||||
// 25.1.5.4 ArrayBuffer.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-arraybuffer.prototype-@@tostringtag
|
||||
define_property(vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.ArrayBuffer.as_string()), Attribute::Configurable);
|
||||
|
Loading…
Reference in New Issue
Block a user