|
Rank: Member Groups: Member
Joined: 12/10/2015 Posts: 17
|
HI
"EO.Webbrowser" is a very good browser component, the performance is very good, I want to do a full automatic posting of the software, but some of the site is a cross domain, I am not in the test "EO.Webbrowser" time to find a better way to achieve
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi, I am not sure if you meant cross domain script security issue. By default cross domain scripting is forbidden due to security issues. You can turn this security check off by setting this property to false: http://www.essentialobjects.com/doc/eo.webengine.browseroptions.enablexssauditor.aspxYou can see here for more information on how to set this property: http://www.essentialobjects.com/doc/webbrowser/advanced/browser_options.aspxThanks!
|
|
Rank: Member Groups: Member
Joined: 12/10/2015 Posts: 17
|
Hello, this is the code in VB.Net
Code: Visual Basic.NET
Protected Overrides Sub OnCreateMainForm()
Dim opt As New EO.WebEngine.BrowserOptions
opt.EnableXSSAuditor = False
EO.WebEngine.EngineOptions.Default.SetDefaultBrowserOptions(opt)
Me.MainForm = Global.EOWEB_Demo.Form1
End Sub
I tested it, or I can't access the elements in Iframe by JavaScript. <- IFRAME src="b.html" id="f" ->-<- /iframe->
Code: JavaScript
alert(document.getElementById('f').contentWindow.document.location)
|
|
Rank: Member Groups: Member
Joined: 12/10/2015 Posts: 17
|
Well, thank you very much.
Code: Visual Basic.NET
BrowserOptions.EnableWebSecurity=False
If JSObject Class WebView can be transformed into Class [Iframe] is better, because he has a LoadUrl method, you can directly submit data to the web, and iframe elements can not
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi, Thanks for the update. I am not sure if I understand your question. Do you mean setting EnableWebSecurity works for you? There is no IFrame class. You can use JSObject to call any method or set any property that actually exists on that object. You can see here for more details: http://www.essentialobjects.com/doc/webbrowser/advanced/js.aspxhttp://www.essentialobjects.com/doc/eo.webbrowser.jsobject.aspxFor example, if the underlying JavaScript object has a "LoadUrl" method, then you can use jsObj.InvokeFunction("LoadUrl", your_url) in your code to call that function. Thanks!
|
|