Page 1 of 1
DOMVisitor with Subprocess
Posted: Wed Jun 17, 2020 4:08 pm
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?
Re: DOMVisitor with Subprocess
Posted: Thu Jun 18, 2020 7:10 am
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.