mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
indexed getter of form elements
This commit is contained in:
parent
3fa0dca3a3
commit
4bb88432b2
5 changed files with 36 additions and 6 deletions
|
@ -6,6 +6,7 @@ use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
|
|||
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
|
||||
use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
|
||||
use dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods;
|
||||
use dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding::HTMLFormControlsCollectionMethods;
|
||||
use dom::bindings::codegen::Bindings::HTMLFormElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLFormElementBinding::HTMLFormElementMethods;
|
||||
use dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods;
|
||||
|
@ -229,6 +230,12 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
|||
fn Length(&self) -> u32 {
|
||||
self.Elements().Length() as u32
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-form-item
|
||||
fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Root<Element>> {
|
||||
let elements = self.Elements();
|
||||
elements.IndexedGetter(index, found)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, HeapSizeOf, PartialEq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue