mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57: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:
parent
d74ad81402
commit
9fab52a390
6 changed files with 18 additions and 40 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue