Browse Source

fallback to global attributes when mapping rsx rosetta html attribute names

Evan Almloff 1 năm trước cách đây
mục cha
commit
682beeccfd
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      packages/html/src/elements.rs

+ 8 - 0
packages/html/src/elements.rs

@@ -345,6 +345,14 @@ macro_rules! builder_constructors {
                 )*
             )*
 
+            if let Some(name) = crate::map_html_global_attributes_to_rsx(html) {
+                return Some(name);
+            }
+
+            if let Some(name) = crate::map_html_svg_attributes_to_rsx(html) {
+                return Some(name);
+            }
+
             None
         }