Re: How to get DOMDocument from WkWebView
I do the same thing (in an app I've been tinkering with for years), but it's a dead end. WkWebView runs the WebView in a separate process, for security reasons, which means its DOM objects are completely inaccessible. The best workaround seems to be to write the DOM stuff in JavaScript, and use the hooks Keary mentioned to communicate messages back and forth to the native app. In other words, it's a lot like a modern web app, except using those hooks instead of XHR. —Jens |
|