Results 1 to 40 of 54

Thread: vb6 webview2 by IUnknown WebView2Loader.dll-Edge-Chromium

Threaded View

  1. #21

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,541

    Re: vb6 edge webview2 demo by IUnknown,without rc6.dll

    HostObjectClass.cls , for eval js,get js result

    a=Eval("document.title")
    a=eval("33+44")

    Code:
    Public JsResult As String
    Function Eval(js As String) As String
        JsResult = ""
        Dim Start As Long:Start = timeGetTime
        ExecuteScript "HostClassA2.ReturnVal(" & js & ")"
        
        While JsResult = "" And timeGetTime - Start < 1000
        DoEvents:    Wend
        Eval = JsResult
    End Function
    
    Public Sub ReturnVal(s)
        JsResult = s
    End Sub
    Last edited by xiaoyao; Jun 3rd, 2023 at 12:56 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width