Skip to main content

Webview

Function Webview 

Source
pub fn Webview(_: WebviewProps) -> Element
Expand description

Embedded browser chrome around a sandboxed frame. Changing src navigates; so does the address bar, after frame_url refuses unsafe schemes. With tabs, a tab list sits above the toolbar and reports choices through ontab.

§Props

For details, see the props struct definition.

  • title : AccessibleName

    The frame’s title, which names it for assistive technology.

  • src : String

    The page to show; a change navigates.

  • tabs : Vec<String>

    Page tab labels.

  • selected_tab : usize
  • ontab : Option<EventHandler<usize>>
  • sandbox : String

    The 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.

  • onnavigate : Option<EventHandler<String>>
  • onstate : Option<EventHandler<WebviewState>>
  • class : Option<String>
  • attributes : Vec<Attribute>