Implement 'labels' attribute on 'labelable elements'

This commit is contained in:
Corey Farwell 2015-10-10 13:44:28 -04:00
parent 37c03c7816
commit 9df375195e
22 changed files with 184 additions and 63 deletions

View file

@ -17,6 +17,7 @@ use dom::htmlfieldsetelement::HTMLFieldSetElement;
use dom::htmlformelement::{FormControl, HTMLFormElement};
use dom::htmloptionelement::HTMLOptionElement;
use dom::node::{Node, window_from_node};
use dom::nodelist::NodeList;
use dom::validitystate::ValidityState;
use dom::virtualmethods::VirtualMethods;
use selectors::states::*;
@ -158,6 +159,11 @@ impl HTMLSelectElementMethods for HTMLSelectElement {
"select-one".to_owned()
}
}
// https://html.spec.whatwg.org/multipage/#dom-lfe-labels
fn Labels(&self) -> Root<NodeList> {
self.upcast::<HTMLElement>().labels()
}
}
impl VirtualMethods for HTMLSelectElement {