mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -2,11 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::Bindings::HTMLProgressElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLProgressElementBinding::{self, HTMLProgressElementMethods};
|
||||
use dom::bindings::conversions::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom::nodelist::NodeList;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -32,3 +34,10 @@ impl HTMLProgressElement {
|
|||
Node::reflect_node(box element, document, HTMLProgressElementBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLProgressElementMethods for HTMLProgressElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-lfe-labels
|
||||
fn Labels(&self) -> Root<NodeList> {
|
||||
self.upcast::<HTMLElement>().labels()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue