mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / WebKitXCEF3 Object / DispatchEventAsync Method

CSS3 Selector of the Event Target HTML5 Element.

If you are unfamiliar with CSS3 Selectors have a look in Finding the correct CSS3 Selector article.

The name of the Event.

Set True for Event Bubbling.

Set True if Event can be cancelled.

Set True if Event is Composed.

Event Data passed as OLE/COM Variant which is converted to V8 JavaScript Value.

In This Topic
    DispatchEventAsync Method
    In This Topic
    Description

    Dispatches an Event asynchronously at the specified EventTarget, invoking the affected EventListeners in the appropriate order.

    Syntax
    Visual Basic
    Public Sub DispatchEventAsync( _
       ByVal TargetSelector As String, _
       ByVal EventName As String, _
       ByVal Bubbles As Boolean, _
       ByVal Cancelable As Boolean, _
       ByVal Composed As Boolean, _
       ByVal Detail As Variant _
    ) 
    Parameters
    TargetSelector

    CSS3 Selector of the Event Target HTML5 Element.

    If you are unfamiliar with CSS3 Selectors have a look in Finding the correct CSS3 Selector article.

    EventName

    The name of the Event.

    Bubbles

    Set True for Event Bubbling.

    Cancelable

    Set True if Event can be cancelled.

    Composed

    Set True if Event is Composed.

    Detail

    Event Data passed as OLE/COM Variant which is converted to V8 JavaScript Value.

    Remarks

    WebKitX DispatchEventAsync() method allows you to fire DOM events directly into HTML5 and handle those events by JavaScript event handlers. You can pass the target selector that will receive the event, the event name, event initialization parameters (bubbling, cancelable, composed) and an OLE/COM Variant that will be converted into a V8 JavaScript object and added in the details field of the Event object. Event execution is asynchronous in terms of IPC tunneling and immutable in terms of DOM.

    Dispatch Event Circuit

    Dispatch Event Circuit

     

    Example
    Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
        On Error Resume Next
        If UnloadMode = 0 Then
            Cancel = 1
            frm_Designer.Editor.DispatchEventAsync "#x-w2ui-designer-action-stop", "click", False, False, False, ""
        End If
    End Sub
    See Also