Friday, December 22, 2017

WKWebView Workarounds

Brent Simmons:

WebView — good ’ol trusty friend — has a bunch of things that WKWebView is missing.

The new web view has no built-in support for finding text, for instance. I’m not sure what I’m going to do about this, since the ability to hit cmd-F and look for some text is a pretty fundamental thing, and I can’t skip it.

It also has no delegate method for when you mouse over a link. Seems like another fundamental thing, right? Any browser offers you a status bar or some way to see the URL of the link your mouse is over.

Given the level of progress over the last 3.5 or so years, it seems like WKWebView is the future, and too bad for you if you need more features. Maybe you can hack some of them together using JavaScript. With Apple no longer dogfooding WebView, how much longer will it be supported? This is the sort of thing that worries me about iOS APIs coming to the Mac.

Update (2018-05-14): Howard Oakley:

That may be true, but when I had implemented that in LockRattler, which runs on El Capitan and later, Xcode decided that I couldn’t use WKWebView because of implementation bugs. It only works in Sierra and later, not in El Capitan.

1 Comment RSS · Twitter

[…] WKWebView Workarounds, WKWebView, Sandboxing, and Searching, […]

Leave a Comment