Rank: Newbie Groups: Member
Joined: 4/7/2015 Posts: 8
|
Hi, first off great job on the support and constant releases!
I am encountering an interesting issue, I have some code that looks like this...
if (wb.WebView.CanEvalScript) { wb.WebView.EvalScript("document.activeElement.focus()"); }
this is the only place where I call EvalScript in this scenerio.
However sometimes (maybe 5% of the time) I get a popup that gives me this error:
" It is not safe to run JavaScript code at this moment. This can occur if you are inside event handlers of certain WebView events. In that case please check CanEvalScript property before calling EvalScript. "
The strange part is, I AM checking this CanEvalScript property, however still seldomly I will get an EO runtime exception popup stating the above error.
Is there anything else I can do to get around this runtime exception? Also is there a way to suppress the runtime exception popups? (I will still realize the issue is there however I dont want to constantly see the dialogs)
Thanks! Galloden
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
Please use WebView.QueueScriptCall instead.
Thanks!
|