LibWeb: Implement Document.getElementsByClassName()

Note that we're taking a shortcut here and returning the elements as an
Array instead of HTMLCollection. One day we'll have to bite the bullet
and deal with HTMLCollection, but not today.
This commit is contained in:
Andreas Kling 2020-12-01 15:47:50 +01:00
commit 7c4c706ebe
Notes: sideshowbarker 2024-07-19 01:07:34 +09:00
3 changed files with 13 additions and 0 deletions

View file

@ -132,6 +132,7 @@ public:
NonnullRefPtrVector<Element> get_elements_by_name(const String&) const;
NonnullRefPtrVector<Element> get_elements_by_tag_name(const FlyString&) const;
NonnullRefPtrVector<Element> get_elements_by_class_name(const FlyString&) const;
const String& source() const { return m_source; }
void set_source(const String& source) { m_source = source; }