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.

DOMVisitor with Subprocess

Post Reply
renab
Posts: 8
Joined: Wed Jun 17, 2020 4:00 pm

DOMVisitor with Subprocess

Post by renab »

Hello --

Is there a way to use the DOM Visitor when you are using a separately named subprocess? (i.e., when BrowserSubprocessPath is specified as a different exe than the main application). Does some of the DOM Visitor code need to go into the subprocess instead?
User avatar
salvadordf
Posts: 4575
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: DOMVisitor with Subprocess

Post by salvadordf »

Hi,

All demos can be configured to use a different EXE for the subprocesses. All you have to do is move the code related to the render process to the new subprocess project.

For example, the JavaScript\JSSimpleWindowBinding demo uses the same EXE for all processes and the JavaScript\JSWindowBindingSubProcess demo do exactly the same but using a different EXE for the subprocesses.

In that example the GlobalCEFApp.OnContextCreated event is used in the Subprocess project because it's executed only in the render process.

In the case of the DOMVisitor you would have to move the code using the GlobalCEFApp.OnProcessMessageReceived event to the subprocess project so you would have to move these functions : GlobalCEFApp_OnProcessMessageReceived, DOMVisitor_GetFrameIDs, DOMVisitor_OnDocAvailableFullMarkup, DOMVisitor_OnDocAvailable, SimpleNodeSearch and SimpleDOMIteration.
Post Reply