mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibWeb: Const qualify HTMLCollection::length
This commit is contained in:
parent
041d5bff91
commit
15944c5b26
Notes:
sideshowbarker
2024-07-17 10:16:43 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/15944c5b26 Pull-request: https://github.com/SerenityOS/serenity/pull/20656 Reviewed-by: https://github.com/awesomekling
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue