mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / WebKitXCEF3 Object / OnScriptResourceCancelled Event

The URL of the Script resource.

In This Topic
    OnScriptResourceCancelled Event
    In This Topic
    Description
    Fired when a Script Resource is cancelled. To control scripts download set DownloadScripts to False.
    Syntax
    Visual Basic
    Public Event OnScriptResourceCancelled( _
       ByVal url As String _
    )
    Parameters
    url

    The URL of the Script resource.

    Remarks

    Please note that in WebKitX downloading script tags is disabled by default because in editor mode JavaScript execution often messes with HTML5 styles, especially if you are using features such as Parallax Scrolling and JavaScript-aided responsive layouts. If you want to download and execute JavaScript you must explicitly enable it using  WebKitX1.DownloadScripts = True in OnBrowserReady event handler, as illustrated in code fragment below.

    As a side note, in editor mode of WebKitX you can execute JavaScript at run-time using EvalAddScriptAddCode and ExecuteCommand methods, even if DownloadScripts is false.

    The key difference is download-time and run-time JavaScript execution.

    WebKitX DownloadScripts parameter controls download-time JavaScript and not run-time JavaScript.

    Example
    Private Sub WebKitX1_OnBrowserReady()       
    
        ' Allow JavaScript download
        WebKitX1.DownloadScripts = True
    
    End Sub
    
    Private Sub WebKitX1_OnScriptResourceCancelled(ByVal URL As String)
    
    End Sub
    private void WebKitXCEF31_OnBrowserReady(object sender, EventArgs e)
    {
        WebKitXCEF31.DownloadScripts = false;
    }
    
    private void WebKitXCEF31_OnScriptResourceCancelled(object sender, AxWebKitXCEF3Lib._DWebKitXCEF3Events_OnScriptResourceCancelledEvent e)
    {
    
    }
    See Also