mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / Settings Object / allow_popup_windows Property
In This Topic
    allow_popup_windows Property
    In This Topic
    Description

    Controls if popup windows are allowed.

    Property type
    Read-write property
    Syntax
    Visual Basic
    Public Property allow_popup_windows As Boolean
    Remarks

    By default, popup windows are loaded in main frame. By setting this property to true a popup window will be created and displayed.

    Unlimited popup nesting is allowed but no loading sequence events are generated for Popup windows.

    Example
    Private Sub Form_Resize()
        On Error Resume Next
        WebKitX1.Move 0, 0, ScaleWidth, ScaleHeight
        Err.Clear
    End Sub
    
    Private Sub WebKitX1_OnCreate(ByVal Settings As WebKitXCEF3Lib.ISettings, CommandLineSwitches As String)
        Settings.allow_popup_windows = True
        Settings.cache_path = App.Path + "\MyCache"
        Settings.application_cache = App.Path + "\MyAppCache"
        CommandLineSwitches = ""
    End Sub
    
    Private Sub WebKitX1_OnBrowserReady()
        WebKitX1.Open App.Path + "\test.html"
    End Sub
    <!DOCTYPE html>
    <html>
    <body>
    
    <button onclick="openWin()">Open "myWindow"</button>
    <button onclick="closeWin()">Close "myWindow"</button>
    
    <script>
    var myWindow;
    
    function openWin() {
      myWindow = window.open("", "myWindow", "width=200,height=100");
      myWindow.document.write("<p>This is 'myWindow'</p>");
    }
    
    function closeWin() {
      myWindow.close();
    }
    </script>
    
    </body>
    </html>
    See Also