xilem_web: Add function to set HtmlIFrameElement src attribute (#466)

Apropos of #462. Let me know if this should have a test or an example!
This commit is contained in:
Casey Rodarmor 2024-07-31 01:01:56 -07:00 committed by GitHub
parent b71f533571
commit 741c36b13a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -637,6 +637,10 @@ where
pub trait HtmlIFrameElement<State, Action = ()>:
HtmlElement<State, Action, DomNode: AsRef<web_sys::HtmlIFrameElement>>
{
/// See <https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/src> for more details
fn src(self, value: impl IntoAttributeValue) -> Attr<Self, State, Action> {
Attr::new(self, "src".into(), value.into_attr_value())
}
}
// #[cfg(feature = "HtmlIFrameElement")]