Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

ExecuteJavaScript does not execute js?

Post Reply
dian
Posts: 21
Joined: Thu Aug 29, 2019 8:42 am

ExecuteJavaScript does not execute js?

Post 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
User avatar
salvadordf
Posts: 4573
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: ExecuteJavaScript does not execute js?

Post 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.
dian
Posts: 21
Joined: Thu Aug 29, 2019 8:42 am

Re: ExecuteJavaScript does not execute js?

Post 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
User avatar
salvadordf
Posts: 4573
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: ExecuteJavaScript does not execute js?

Post 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.
dian
Posts: 21
Joined: Thu Aug 29, 2019 8:42 am

Re: ExecuteJavaScript does not execute js?

Post by dian »

Unfortunately sequential versions are unusable - they lacks critical features (
Post Reply