ladybird/Tests/LibWeb/Text/input/url-search-params-iterator-iterator.html
Andreas Kling 7f90b0cab7 LibWeb: Don't override prototype on generated iterator prototypes
Generated iterator prototypes already have the IteratorPrototype as
their prototype, but we were incorrectly hijacking them and rerouting
to ObjectPrototype.

Regressed in cfe663435e.
2023-06-08 10:05:56 +02:00

13 lines
462 B
HTML

<script src="include.js"></script>
<script>
test(() => {
let u = new URLSearchParams();
let iterator = u[Symbol.iterator]();
println(iterator);
println(iterator[Symbol.iterator]());
println(iterator === iterator[Symbol.iterator]());
println(iterator[Symbol.iterator].call("hello"));
println(iterator[Symbol.iterator].call(1));
println(iterator[Symbol.iterator].call(window));
});
</script>