mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
HTMLOptionElement.index
This commit is contained in:
parent
c6192dc286
commit
767ccbe568
5 changed files with 43 additions and 25 deletions
|
@ -102,7 +102,7 @@ impl HTMLSelectElement {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#concept-select-option-list
|
||||
fn list_of_options(&self) -> impl Iterator<Item = DomRoot<HTMLOptionElement>> {
|
||||
pub fn list_of_options(&self) -> impl Iterator<Item = DomRoot<HTMLOptionElement>> {
|
||||
self.upcast::<Node>().children().flat_map(|node| {
|
||||
if node.is::<HTMLOptionElement>() {
|
||||
let node = DomRoot::downcast::<HTMLOptionElement>(node).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue