I've take code from JSExtensionWithFunction and I have successfully created a project that get JS commands from html page.
It works perfect but only if SingleProcess = true. When the SingleProcess = false the Chromium1ProcessMessageReceived never receives any message.
Any idea?
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.
JSExtensionWithFunction with multi process not working
Re: JSExtensionWithFunction with multi process not working
Small correction:
I JSRTTIExtension example not JSExtensionWithFunction.
I JSRTTIExtension example not JSExtensionWithFunction.
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: JSExtensionWithFunction with multi process not working
Hi,
I just tested the JSRTTIExtension demo in the latest CEF4Delphi version available at GitHub with Delphi 10.3.3 and it works correctly.
The single process mode is not supported and may cause unexpected issues. Use it only for debugging purposes.
I just tested the JSRTTIExtension demo in the latest CEF4Delphi version available at GitHub with Delphi 10.3.3 and it works correctly.
The single process mode is not supported and may cause unexpected issues. Use it only for debugging purposes.
Re: JSExtensionWithFunction with multi process not working
That's what I am telling
Single process: works properly
Multi process: not working
So I can't rely on Single process.
I would try with latest version and let you know asap.
Single process: works properly
Multi process: not working
So I can't rely on Single process.
I would try with latest version and let you know asap.
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: JSExtensionWithFunction with multi process not working
I forgot to add that Delphi can only debug one process and any breakpoint set while debugging the main browser process will not seem to work if it's set on a procedure that it's only executed in the render process.
In reality, it is executed but Delphi is debugging a different process.
In reality, it is executed but Delphi is debugging a different process.
Re: JSExtensionWithFunction with multi process not working
You mean while you have "Integrated debugger" set to on, right?
Because I am trying with debugger off using build platform Release and, still doesnt work.
Didnt tried the latest version yet.
Because I am trying with debugger off using build platform Release and, still doesnt work.
Didnt tried the latest version yet.
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: JSExtensionWithFunction with multi process not working
Yes, you need to build the demo with the Debug configuration and also run with the integrated debugger (F9).
The JSRTTIExtension demo is a slightly less complicated version of the JSExtension demo that uses RTTI.
Please, try the JSExtension demo in the latest CEF4Delphi version and read this for more details about debugging and how to make JavaScript extensions work :
https://www.briskbard.com/index.php?lan ... #debugging
https://www.briskbard.com/forum/viewtop ... 4084#p4084
The JSRTTIExtension demo is a slightly less complicated version of the JSExtension demo that uses RTTI.
Please, try the JSExtension demo in the latest CEF4Delphi version and read this for more details about debugging and how to make JavaScript extensions work :
https://www.briskbard.com/index.php?lan ... #debugging
https://www.briskbard.com/forum/viewtop ... 4084#p4084