on master help sign in
Fix small issue with macro
commitd01204ad836663570ff3f6229fd49095214c3869 authorRyan Levick <ryan.levick@gmail.com> dateSat 16 Mar 2019, 13:58 (8 years ago) parentc725015
2 files changed+7−3
src/builder.rs+1−1 src/vdom.rs+6−2
src/builder.rs+1−1
@@ -394,7 +394,7 @@ macro_rules! builder_constructors {
394394 bumpalo::collections::Vec<'a, Attribute<'a>>,
395395 bumpalo::collections::Vec<'a, Node<'a>>,
396396 > {
397− ElementBuilder::new_with_namespace(bump, stringify!($name), stringify!(namespace))
397+ ElementBuilder::new_with_namespace(bump, stringify!($name), $namespace)
398398 }
399399 )*
400400 }
src/vdom.rs+6−2
@@ -508,8 +508,12 @@ impl VdomInnerExclusive {
508508 self.change_list.emit_new_event_listener(l);
509509 }
510510 for attr in attributes {
511− self.change_list
512− .emit_set_attribute_ns(&attr.name, &attr.value);
511+ if attr.name == "xmlns" {
512+ self.change_list.emit_set_attribute(&attr.name, &attr.value);
513+ } else {
514+ self.change_list
515+ .emit_set_attribute_ns(&attr.name, &attr.value);
516+ }
513517 }
514518 for child in children {
515519 self.create(registry, child.clone());