Hello! I recently changed my delphi application to use TWVBrowser instead of TWebBrowser, which used Internet explorer engine to work.
This last class had a Document property, whose body was used to get latitudes and longitudes on a Google maps map. Is there any alternative to this property in TWVBrowser? I imagine it's in there somewhere since i can access the document title.
Any help would be appreciated
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.
Document instance
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Document instance
Hi,
Read this to know more about the DOM access feature request :
https://github.com/MicrosoftEdge/WebView2Feedback/issues/77
For now, you can execute JavaScript or use the DevTools methods to access the DOM.
Read this to know more about the DOM access feature request :
https://github.com/MicrosoftEdge/WebView2Feedback/issues/77
For now, you can execute JavaScript or use the DevTools methods to access the DOM.
Re: Document instance
Hi!
Thanks for the quick answer.
I think i could get away with JavaScript, though there's something I'm not quite getting.
I dont need to manipulate the DOM, instead I need to get and element value by its ID.
I can call the JavaScript function but I dont understand where the result im asking is left.
Sorry if my question sounds dumb or low level, I dont have much experience with web development and the way it functions.
Thanks for the quick answer.
I think i could get away with JavaScript, though there's something I'm not quite getting.
I dont need to manipulate the DOM, instead I need to get and element value by its ID.
I can call the JavaScript function but I dont understand where the result im asking is left.
Sorry if my question sounds dumb or low level, I dont have much experience with web development and the way it functions.
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Document instance
You can execute any custom JS code and send the results to Delphi using the functions that you can find in the BrowserHostAppCommunication demo.