mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Implement HTMLLIElement#value
This commit is contained in:
parent
1f34d4f219
commit
defaa5bee7
7 changed files with 46 additions and 217 deletions
|
@ -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) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue