Class: Wx::WEB::WebViewEvent

Inherits:
NotifyEvent show all
Defined in:
lib/wx/doc/gen/web/web_view_event.rb

Overview

A navigation event holds information about events associated with WebView objects.

Events emitted by this class

The following event-handler methods redirect the events to member method or handler blocks for WebViewEvent events. Event handler methods for events emitted by this class:

Library: WebView Category: Events, WebView

See Also:

Requires:

  • USE_WEBVIEW

Instance Method Summary collapse

Methods inherited from NotifyEvent

#allow, #is_allowed, #veto

Methods inherited from CommandEvent

#client_data, #client_data=, #get_client_data, #get_client_object, #get_int, #get_selection, #get_string, #is_checked, #is_selection, #set_client_data, #set_client_object, #set_extra_long, #set_int, #set_string

Methods inherited from Event

#clone, #get_event_category, #get_event_object, #get_event_type, #get_id, #get_skipped, #get_timestamp, #is_command_event, #resume_propagation, #set_event_object, #set_event_type, #set_id, #set_timestamp, #should_propagate, #skip, #stop_propagation

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initializeWx::WEB::WebViewEvent #initialize(type, id, href, target, flags = Wx::WEB::WebViewNavigationActionFlags::WEBVIEW_NAV_ACTION_NONE, messageHandler = ('')) ⇒ Wx::WEB::WebViewEvent

Returns a new instance of WebViewEvent.

Overloads:

  • #initializeWx::WEB::WebViewEvent
  • #initialize(type, id, href, target, flags = Wx::WEB::WebViewNavigationActionFlags::WEBVIEW_NAV_ACTION_NONE, messageHandler = ('')) ⇒ Wx::WEB::WebViewEvent

    Parameters:

    • type (Wx::ScrolledWindow::EventType)
    • id (Integer)
    • href (String)
    • target (String)
    • flags (Wx::WebViewNavigationActionFlags) (defaults to: Wx::WEB::WebViewNavigationActionFlags::WEBVIEW_NAV_ACTION_NONE)
    • messageHandler (String) (defaults to: (''))


62
# File 'lib/wx/doc/gen/web/web_view_event.rb', line 62

def initialize(*args) end

Instance Method Details

#get_message_handlerWx::String Also known as: message_handler

Get the name of the script handler.

Only valid for events of type EVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED

Returns:

  • (Wx::String)


87
# File 'lib/wx/doc/gen/web/web_view_event.rb', line 87

def get_message_handler; end

#get_navigation_actionWx::WebViewNavigationActionFlags Also known as: navigation_action

Get the type of navigation action.

Only valid for events of type EVT_WEBVIEW_NEWWINDOW

Returns:

  • (Wx::WebViewNavigationActionFlags)


80
# File 'lib/wx/doc/gen/web/web_view_event.rb', line 80

def get_navigation_action; end

#get_targetWx::String Also known as: target

Get the name of the target frame which the url of this event has been or will be loaded into.

This may return an empty string if the frame is not available.

Returns:

  • (Wx::String)


68
# File 'lib/wx/doc/gen/web/web_view_event.rb', line 68

def get_target; end

#get_target_window_featuresWx::WEB::WebViewWindowFeatures Also known as: target_window_features

Get information about the target window.

Only valid for events of type EVT_WEBVIEW_NEWWINDOW_FEATURES

Note:

This function is not implemented and always returns nil when using WebKit1 or Internet Explorer backend.



101
# File 'lib/wx/doc/gen/web/web_view_event.rb', line 101

def get_target_window_features; end

#get_urlWx::String Also known as: url

Get the URL being visited.

Returns:

  • (Wx::String)


73
# File 'lib/wx/doc/gen/web/web_view_event.rb', line 73

def get_url; end

#is_errorBoolean Also known as: error?

Returns true if the operation failed.

Only valid for events of type EVT_WEBVIEW_SCRIPT_RESULT and EVT_WEBVIEW_BROWSING_DATA_CLEARED

Returns:

  • (Boolean)


108
# File 'lib/wx/doc/gen/web/web_view_event.rb', line 108

def is_error; end

#is_target_main_frameBoolean Also known as: target_main_frame?

Returns true if the navigation target is the main frame.

Only valid for events of type EVT_WEBVIEW_NAVIGATING

Note:

This is only available with the macOS and the Edge backend.

Returns:

  • (Boolean)


121
# File 'lib/wx/doc/gen/web/web_view_event.rb', line 121

def is_target_main_frame; end