Class: Ruflet::UI::Controls::RufletComponents::WebViewControl
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/webview_control.rb
Constant Summary collapse
- TYPE =
"WebView".freeze
- WIRE =
"WebView".freeze
Constants inherited from Control
Instance Attribute Summary
Attributes inherited from Control
#children, #id, #props, #runtime_page, #type, #wire_id
Instance Method Summary collapse
-
#initialize(id: nil, bgcolor: nil, data: nil, enable_javascript: nil, expand: nil, height: nil, key: nil, method: nil, opacity: nil, rtl: nil, tooltip: nil, url: nil, visible: nil, width: nil, on_page_ended: nil, on_page_started: nil, on_web_resource_error: nil) ⇒ WebViewControl
constructor
A new instance of WebViewControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, bgcolor: nil, data: nil, enable_javascript: nil, expand: nil, height: nil, key: nil, method: nil, opacity: nil, rtl: nil, tooltip: nil, url: nil, visible: nil, width: nil, on_page_ended: nil, on_page_started: nil, on_web_resource_error: nil) ⇒ WebViewControl
Returns a new instance of WebViewControl.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/webview_control.rb', line 11 def initialize(id: nil, bgcolor: nil, data: nil, enable_javascript: nil, expand: nil, height: nil, key: nil, method: nil, opacity: nil, rtl: nil, tooltip: nil, url: nil, visible: nil, width: nil, on_page_ended: nil, on_page_started: nil, on_web_resource_error: nil) props = {} props[:bgcolor] = bgcolor unless bgcolor.nil? props[:data] = data unless data.nil? props[:enable_javascript] = enable_javascript unless enable_javascript.nil? props[:expand] = unless .nil? props[:height] = height unless height.nil? props[:key] = key unless key.nil? props[:method] = method unless method.nil? props[:opacity] = opacity unless opacity.nil? props[:rtl] = rtl unless rtl.nil? props[:tooltip] = tooltip unless tooltip.nil? props[:url] = url unless url.nil? props[:visible] = visible unless visible.nil? props[:width] = width unless width.nil? props[:on_page_ended] = on_page_ended unless on_page_ended.nil? props[:on_page_started] = on_page_started unless on_page_started.nil? props[:on_web_resource_error] = on_web_resource_error unless on_web_resource_error.nil? super(type: TYPE, id: id, **props) end |