Implement HTMLLIElement#value

This commit is contained in:
vrod 2016-07-26 22:40:19 -03:00
parent 1f34d4f219
commit defaa5bee7
7 changed files with 46 additions and 217 deletions

View file

@ -46,6 +46,22 @@ macro_rules! make_limited_int_setter(
);
);
#[macro_export]
macro_rules! make_int_setter(
($attr:ident, $htmlname:tt, $default:expr) => (
fn $attr(&self, value: i32) {
use dom::bindings::inheritance::Castable;
use dom::element::Element;
let element = self.upcast::<Element>();
element.set_int_attribute(&atom!($htmlname), value)
}
);
($attr:ident, $htmlname:tt) => {
make_int_setter!($attr, $htmlname, 0);
};
);
#[macro_export]
macro_rules! make_int_getter(
($attr:ident, $htmlname:tt, $default:expr) => (