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

    Return an HTML5Document wrapper / proxy for Document Element.

    Property type
    Read-only property
    Syntax
    Visual Basic
    Public Property Document As HTML5Document
    Return Type

    Return an HTML5Document wrapper / proxy for Document Element.

    Remarks

    HTML5Document COM Class is light-weight wrapper / proxy between COM and Chromium worlds. An instance of this COM class holds internally a CSS3-like selector that is used as and when needed for accessing the underlying HTML5 DOM Node of the WebKit Blink Rendering Engine. This COM object is taking advantage of WebKitX IPC mechanism in order to read / write DOM attributes or CSS3 styles synchronously. You may keep a reference to an HTML5Element instance for as long as the WebKitX control and its HTML5 Page are loaded and dispose references when you change page or destroy the control.

    Accessing and Manipulating HTML5 DOM Programmatically with COM Wrappers

    Accessing and Manipulating HTML5 DOM Programmatically with COM Wrappers

     

    Example
    Private Sub mnuDomAccss_Click()
    
        Dim Element As HTML5Element
    
        Set Element = WebKitX1.QuerySelector(CurrentSelector)
        Debug.Print Element.ClassName
        
        WebKitX1.Document.Body.Style.Border = "1px solid red"
    
        Debug.Print WebKitX1.Document.Body.FirstElementChild.NextElementSibling.InnerHTML
    
        ' Break in VB6 debugger.
        ' Add a watch for Element and expand it.
        Debug.Assert False
    
    End Sub
    See Also