Implement HTMLAppletElement.name

This commit is contained in:
Anthony Ramine 2015-05-02 12:27:42 +02:00
parent 2176aab642
commit b86672af0c
6 changed files with 45 additions and 137 deletions

View file

@ -199,6 +199,20 @@ macro_rules! make_limited_uint_setter(
};
);
#[macro_export]
macro_rules! make_atomic_setter(
( $attr:ident, $htmlname:expr ) => (
fn $attr(self, value: DOMString) {
use dom::element::{Element, AttributeHandlers};
use dom::bindings::codegen::InheritTypes::ElementCast;
use string_cache::Atom;
let element: JSRef<Element> = ElementCast::from_ref(self);
// FIXME(pcwalton): Do this at compile time, not at runtime.
element.set_atomic_attribute(&Atom::from_slice($htmlname), value)
}
);
);
/// For use on non-jsmanaged types
/// Use #[jstraceable] on JS managed types
macro_rules! no_jsmanaged_fields(