LibWeb: Const qualify HTMLCollection::length

This commit is contained in:
Shannon Booth 2023-08-19 13:41:57 +12:00 committed by Andreas Kling
parent 041d5bff91
commit 15944c5b26
Notes: sideshowbarker 2024-07-17 10:16:43 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ JS::MarkedVector<Element*> HTMLCollection::collect_matching_elements() const
}
// https://dom.spec.whatwg.org/#dom-htmlcollection-length
size_t HTMLCollection::length()
size_t HTMLCollection::length() const
{
// The length getter steps are to return the number of nodes represented by the collection.
return collect_matching_elements().size();

View file

@ -38,7 +38,7 @@ public:
virtual ~HTMLCollection() override;
size_t length();
size_t length() const;
Element* item(size_t index) const;
Element* named_item(DeprecatedFlyString const& name) const;