Skip to content

Commit 741c36b

Browse files
authored
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!
1 parent b71f533 commit 741c36b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

xilem_web/src/interfaces.rs

+4
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,10 @@ where
637637
pub trait HtmlIFrameElement<State, Action = ()>:
638638
HtmlElement<State, Action, DomNode: AsRef<web_sys::HtmlIFrameElement>>
639639
{
640+
/// See <https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/src> for more details
641+
fn src(self, value: impl IntoAttributeValue) -> Attr<Self, State, Action> {
642+
Attr::new(self, "src".into(), value.into_attr_value())
643+
}
640644
}
641645

642646
// #[cfg(feature = "HtmlIFrameElement")]

0 commit comments

Comments
 (0)