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?
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.
DOMVisitor with Subprocess
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: DOMVisitor with Subprocess
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.
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.