mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibWeb: Add getElementsByTagNameNS and add support for * in non-NS
This also moves getElementsByTagName to ParentNode to remove the code duplication between Document and Element. This additionally fixes a bug where getElementsByTagName did not check if the element was a descendant, meaning it would also include the context element if the condition matched.
This commit is contained in:
parent
5c7dca3526
commit
d47e431d54
8 changed files with 70 additions and 24 deletions
|
@ -27,6 +27,9 @@ public:
|
|||
|
||||
NonnullRefPtr<HTMLCollection> children();
|
||||
|
||||
NonnullRefPtr<HTMLCollection> get_elements_by_tag_name(FlyString const&);
|
||||
NonnullRefPtr<HTMLCollection> get_elements_by_tag_name_ns(FlyString const&, FlyString const&);
|
||||
|
||||
protected:
|
||||
ParentNode(Document& document, NodeType type)
|
||||
: Node(document, type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue