Browse Source

Add the onload property to links (#3843)

Kristopher Ali 4 weeks ago
parent
commit
841256e7af
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/document/src/elements/link.rs

+ 4 - 0
packages/document/src/elements/link.rs

@@ -30,6 +30,7 @@ pub struct LinkProps {
     pub blocking: Option<String>,
     #[props(extends = link, extends = GlobalAttributes)]
     pub additional_attributes: Vec<Attribute>,
+    pub onload: Option<String>,
 }
 
 impl LinkProps {
@@ -79,6 +80,9 @@ impl LinkProps {
         if let Some(blocking) = &self.blocking {
             attributes.push(("blocking", blocking.clone()));
         }
+        if let Some(onload) = &self.onload {
+            attributes.push(("onload", onload.clone()));
+        }
         attributes
     }
 }