Page 1 of 1

ExecuteJavaScript does not execute js?

Posted: Fri Apr 24, 2020 7:24 am
by dian
Today I've faced strange behavior of ExecuteJavaScript:
ExecuteJavaScript() runs without any exceptions but js is not actually executed. Even 1st line with console.log()
How could we find out what's happening?

CEF4Delphi version corresponds to CEF 76.1.13

Re: ExecuteJavaScript does not execute js?

Posted: Fri Apr 24, 2020 9:30 am
by salvadordf
Hi,

CEF 76 had some issues with the "Network Service" and you had to disable it to make it work as before.

Try adding this code line before the GlobalCEFApp.StartMainProcess call in the DPR file :

Code: Select all

GlobalCEFApp.DisableFeatures  := 'NetworkService,OutOfBlinkCors';
Also, try executing that JavaScript code in the DevTools to see if there's any syntax error.

If all that fails, try updating CEF4Delphi to the latest version and run your JavaScript code using one of the demos.

Re: ExecuteJavaScript does not execute js?

Posted: Fri Apr 24, 2020 1:02 pm
by dian
Hi,
Thanks for quick reply

I've found following:

* "NetworkService" has already been disabled via in DisableFeatures
* in DevTools console our js runs ok
* if I retry running ExecuteJavaScript() it still keeps silence

Re: ExecuteJavaScript does not execute js?

Posted: Sat Apr 25, 2020 3:05 pm
by salvadordf
Please, upgrade to the latest CEF4Delphi version from GitHub and test it again.

If it fails again then I would need all the JavaScript code, web page address and a short demo to reproduce that issue in my computer.

Re: ExecuteJavaScript does not execute js?

Posted: Mon Apr 27, 2020 10:52 am
by dian
Unfortunately sequential versions are unusable - they lacks critical features (