1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47:35 +00:00

LibJS: Remove shift, pop, push functions from Array object

This abstraction isn't really that useful, as we can access the
underlying Vector<Value> using elements() and operate on it directly.
This commit is contained in:
Linus Groh 2020-04-13 16:21:54 +01:00 committed by Andreas Kling
parent d74ad81402
commit 9fab52a390
6 changed files with 18 additions and 40 deletions

View file

@ -98,7 +98,7 @@ JS::Value DocumentWrapper::query_selector_all(JS::Interpreter& interpreter)
// FIXME: This should be a static NodeList, not a plain JS::Array.
auto* node_list = interpreter.heap().allocate<JS::Array>();
for (auto& element : elements) {
node_list->push(wrap(interpreter.heap(), element));
node_list->elements().append(wrap(interpreter.heap(), element));
}
return node_list;
}