mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:18:11 +00:00
LibWeb: Make ParentNode.children vend the same HTMLCollection every time
Instead of creating a new HTMLCollection every time you access .children, we now follow the spec and vend the same object. This was annoyingly difficult before, and trivial now that the DOM is garbage-collected. :^)
This commit is contained in:
parent
6b3293a74b
commit
dc6e625680
2 changed files with 17 additions and 5 deletions
|
@ -45,6 +45,11 @@ protected:
|
|||
: Node(document, type)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
private:
|
||||
JS::GCPtr<HTMLCollection> m_children;
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue