From dfd62437c4864520faf9c545c5864bf6feaa5720 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Wed, 20 Jul 2022 17:43:50 +0100 Subject: [PATCH] LibWeb: Make IDL-generated iterator prototype next() enumerable as well https://webidl.spec.whatwg.org/#es-iterator-prototype-object > An iterator prototype object must have a next data property with > attributes { [[Writable]]: true, [[Enumerable]]: true, > [[Configurable]]: true } and whose value is a built-in function object > that behaves as follows: This makes three more WPT tests pass here, and likely various others: http://wpt.live/fetch/api/headers/headers-basic.any.html --- .../CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp index 4cc4792fa7..b33ef70b06 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLGenerators.cpp @@ -3774,7 +3774,7 @@ void @prototype_class@::initialize(JS::GlobalObject& global_object) auto& vm = this->vm(); Object::initialize(global_object); - define_native_function(vm.names.next, next, 0, JS::Attribute::Configurable | JS::Attribute::Writable); + define_native_function(vm.names.next, next, 0, JS::Attribute::Writable | JS::Attribute::Enumerable | JS::Attribute::Configurable); define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Iterator"), JS::Attribute::Configurable); }