pub struct WebviewProps {
pub title: AccessibleName,
pub src: String,
pub tabs: Vec<String>,
pub selected_tab: usize,
pub ontab: Option<EventHandler<usize>>,
pub sandbox: String,
pub error: Option<String>,
pub onnavigate: Option<EventHandler<String>>,
pub onstate: Option<EventHandler<WebviewState>>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Properties for the Webview component.
Fields§
§title: AccessibleNameThe frame’s title, which names it for assistive technology.
src: StringThe page to show; a change navigates.
tabs: Vec<String>Page tab labels.
selected_tab: usize§ontab: Option<EventHandler<usize>>§sandbox: StringThe frame’s sandbox. Without allow-same-origin the page runs in an opaque
origin and cannot reach this page’s cookies or storage; add it knowingly.
error: Option<String>Replaces the overlay’s message after a failed load.
onstate: Option<EventHandler<WebviewState>>§class: Option<String>§attributes: Vec<Attribute>Implementations§
Source§impl WebviewProps
impl WebviewProps
Sourcepub fn builder() -> WebviewPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> WebviewPropsBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building WebviewProps.
On the builder, call .title(...), .src(...), .tabs(...)(optional), .selected_tab(...)(optional), .ontab(...)(optional), .sandbox(...)(optional), .error(...)(optional), .onnavigate(...)(optional), .onstate(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of WebviewProps.