mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 04:24:59 +00:00
LibWeb: Add stub implementation of HTMLOptionsCollection
This is a subtype of `DOM::HTMLCollection` that only holds `HTMLOptionElement`s. In this stub implementation only `item`, `namedItem` and `length`, inherited from HTMLCollection, are exposed. This is good enough for applications that only read the collection.
This commit is contained in:
parent
6f4dde253f
commit
624527f15e
6 changed files with 67 additions and 0 deletions
16
Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.cpp
Normal file
16
Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/HTML/HTMLOptionsCollection.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
HTMLOptionsCollection::HTMLOptionsCollection(DOM::ParentNode& root, Function<bool(DOM::Element const&)> filter)
|
||||
: DOM::HTMLCollection(root, move(filter))
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue