Re: How to get DOMDocument from WkWebView


Keary Suska
 

In short, you can’t. WkWebView does not permit direct access to the DOM or expose how the DOM is parsed internally. You have some limited access by being able to inject JavaScript and execute JavaScript on the DOM, as well as some ability to trap events, but that’s it, AFAIK.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

On Jul 7, 2018, at 9:56 AM, Gerriet M. Denkmann <g@...> wrote:

WebView is sort of deprecated.
“In apps that run in OS X 10.10 and later, use the WKWebView class instead of using WebView”

But: how can I get the DOMDocument of a WkWebView?

I navigate (using WebView) the DOM hierarchy to get the interesting stuff.

Join {cocoa@apple-dev.groups.io to automatically receive all group messages.