Rank: Advanced Member Groups: Member
Joined: 2/11/2015 Posts: 122
|
The latest round of updates to EO, after the first 2020 release has broken our ability to use EO.
We had a system setup to download a file via a JS api call which did some special handling, including automatic invocation of the downloaded file under certain circumstances.
We had to do this using EvalScript, and in the latest version EO no longer allows this because in some circumstances it could cause problems. I find it concerning that EO is trying to protect developers from themselves, forcefully.
I tried removing the EvalScript code, and replaced it with a call to WebView.Download, but that also does not work inside the ExtInvoke call back, locking up the browser, which appears to be the the problem that this change to EvalScript is trying to prevent.
This means we cannot update to the latest versions of EO.
This API has been stable for us for years, why was this changed and is there an option to disable this protection? Additionally, why was this not covered in any patch notes, this is a significant breaking change.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This was changed because it has caused problems for other developers. We are not trying to "protect developers from themselves" per se, but rather fixing an issue that must be fixed.
The root of the problem is JavaScript language does not allow re-entering (can you imagine that some of your JavaScript variable elsewhere has been changed when your JavaScript code is display an alert message?). This is an iron rule that is deeply baked into the language itself. Allowing EvalScript from within ExtInvoke breaks this rule and can cause numerous problems such as crash inside the JavaScript engine since the JavaScript runtime engine is not designed to handle this case. As such you will have to change the synchronous nature of your code to asynchronous nature. For example, if you wish to trigger some action on the JavaScript side from within ExtInvoke handler, then you can use BeginInvoke to trigger this action later.
Hope this makes sense to you.
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 2/11/2015 Posts: 122
|
This Works. Please document breaking changes in change notes in the future, possibly with potential upgrade paths so that your users are not blindsided by undocumented breaking changes.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Yes. We hear you. Thank you very much for your valuable feedback.
|