Wisej.Web.WebBrowser.eavl(JS) do not works

0
0

Wisej.Web.WebBrowser.eavl(JS) do not works

In this code, please advise:

Public Class CTreeView_basic_01_ForBooks
Inherits TreeView

Dim OWebBrowser As Wisej.Web.WebBrowser

Public Sub New(INOGuid As Guid, ByRef INoWebBrowser As Wisej.Web.WebBrowser)
OWebBrowser = INoWebBrowser

With Me
.Dock = DockStyle.Fill
.ShowPlusMinus = True
.ShowRootLines = True
.ShowNodeToolTips = True
End With

End Sub

Private Sub CTreeView_basic_01_NodeMouseClick(sender As Object, e As TreeNodeMouseClickEventArgs) Handles Me.NodeMouseClick
Dim OTreeNode As TreeNode = e.Node

Dim searchText As String = OTreeNode.Text

Dim js As String =
“var found = false;
var el = document.body;
if (el.innerText.includes(‘” & searchText.Replace(“”””, “\”””) & “‘)) {
el.style.backgroundColor = ‘yellow’;
found = true;
}
if (!found) alert(‘Nothing Found’);”

OWebBrowser.Eval(js)

End Sub

End Class

 

 

 

 

  • You must to post comments
0
0

Javascript is executed by the browser. So I used google and found why your “code” doesn’t work.

https://stackoverflow.com/ questions/3999101 /get-iframes-document-from-javascript-in- main- document

  • You must to post comments
0
0

Nothing at all, complete silence and darkness.

  • JD
    • JD
    • Jul 27, 2025 - 12:21 pm
    Turn the light on?
  • You must to post comments
0
0

Hi,

“does not work” means what? Do you get an error in the console?
We need a test case with a clear indication of expected result to check this.

Best regards
Frank

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.