Skip to content

Commit

Permalink
xilem_web: Add function to set HtmlIFrameElement src attribute (#466)
Browse files Browse the repository at this point in the history
Apropos of #462. Let me know if this should have a test or an example!
  • Loading branch information
casey authored Jul 31, 2024
1 parent b71f533 commit 741c36b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xilem_web/src/interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 741c36b

Please sign in to comment.