Class: Ruflet::UI::Controls::RufletComponents::WebViewControl

Inherits:
Control
  • Object
show all
Defined in:
lib/ruflet_ui/ruflet/ui/controls/materials/webview_control.rb

Overview

WebView control — parity with Flet's WebView (https://flet.dev/docs/controls/webview/).

Properties: url, bgcolor, prevent_links, plus the usual layout props. Events: on_page_started, on_page_ended, on_web_resource_error, on_progress, on_url_change, on_scroll, on_console_message, on_javascript_alert_dialog. Methods (invoked over the wire on a mounted control): reload, go_back, go_forward, can_go_back, can_go_forward, run_javascript, load_html, load_request, load_file, scroll_to, scroll_by, clear_cache, clear_local_storage, enable_zoom, disable_zoom, set_javascript_mode, get_current_url, get_title, get_user_agent.

Platform note: the native webview (and therefore run_javascript and the events/methods) runs on iOS, Android and macOS. On web it falls back to an