Add the onload property to links (#3843)
This commit is contained in:
1 parent
4276b9b23e
commit
841256e7af
1 file changed
+4
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user