mirror of
https://github.com/servo/servo.git
synced 2025-07-16 03:43:38 +01:00
Implement 'htmlFor' attribute for <label> elements
This commit is contained in:
parent
f97d1d148b
commit
98a6fc07e2
5 changed files with 7 additions and 139 deletions
|
@ -46,6 +46,12 @@ impl HTMLLabelElementMethods for HTMLLabelElement {
|
|||
self.form_owner()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-label-htmlfor
|
||||
make_getter!(HtmlFor, "for");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-label-htmlfor
|
||||
make_atomic_setter!(SetHtmlFor, "for");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-label-control
|
||||
fn GetControl(&self) -> Option<Root<HTMLElement>> {
|
||||
if !self.upcast::<Node>().is_in_doc() {
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
// https://html.spec.whatwg.org/multipage/#htmllabelelement
|
||||
interface HTMLLabelElement : HTMLElement {
|
||||
readonly attribute HTMLFormElement? form;
|
||||
// attribute DOMString htmlFor;
|
||||
attribute DOMString htmlFor;
|
||||
readonly attribute HTMLElement? control;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue