mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
LibHTML: Add Document::get_element_by_id() and get_elements_by_name()
These will be useful for implementing various things. They don't do any caching at the moment, but that might become valuable in the future. To facilitate this change, I also made it possible to abort a tree walk with for_each_in_subtree() by returning IterationDecision::Break from the callback.
This commit is contained in:
parent
465a33443c
commit
4d9740ecef
5 changed files with 57 additions and 11 deletions
|
@ -80,6 +80,9 @@ public:
|
|||
|
||||
void schedule_style_update();
|
||||
|
||||
const Element* get_element_by_id(const String&) const;
|
||||
Vector<const Element*> get_elements_by_name(const String&) const;
|
||||
|
||||
private:
|
||||
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue