mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Labels are a live list in tree order
This commit is contained in:
parent
0d142bea9a
commit
036e8dabe2
14 changed files with 161 additions and 102 deletions
|
@ -140,6 +140,21 @@ macro_rules! make_form_action_getter(
|
|||
);
|
||||
);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! make_labels_getter(
|
||||
( $attr:ident, $memo:ident ) => (
|
||||
fn $attr(&self) -> DomRoot<NodeList> {
|
||||
use crate::dom::htmlelement::HTMLElement;
|
||||
use crate::dom::nodelist::NodeList;
|
||||
self.$memo.or_init(|| NodeList::new_labels_list(
|
||||
self.upcast::<Node>().owner_doc().window(),
|
||||
self.upcast::<HTMLElement>()
|
||||
)
|
||||
)
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! make_enumerated_getter(
|
||||
( $attr:ident, $htmlname:tt, $default:expr, $($choices: pat)|+) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue