mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Implement 'labels' attribute on 'labelable elements'
This commit is contained in:
parent
37c03c7816
commit
9df375195e
22 changed files with 184 additions and 63 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue