After I set the following code...
Quote:Dim options As New EO.WebEngine.BrowserOptions
options.EnableWebSecurity = False
EO.WebBrowser.Runtime.SetDefaultBrowserOptions(options)
I would like to inject some javascript listeners and functions into an iFrame. I know how to do this in the parent URL, but not an iFrame. How can I do this?
Here is my VB.NET code used for the parent:
Quote: Dim myScript As String = readJSFile("injectJavascript.js")
WebView1.EvalScript(myScript)
Private Function readJSFile(ByVal fileName As String) As String
readJSFile = Nothing
If File.Exists(fileName) Then
readJSFile = vbCrLf
For Each line As String In File.ReadLines(fileName)
readJSFile = readJSFile & line & vbCrLf
Next
End If
End Function
injectJavascript.js FILE CONTENTS:
document.onclick = function(e) {
//DO SOMETHING...
}