Add the onload property to links (#3843)

This commit is contained in:
Kristopher Ali authored and GitHub committed 2025-05-30 19:54:55 +02:00
1 parent 4276b9b23e
commit 841256e7af
1 file changed
+4
+4
View File
@@ -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
}
}