-
Notifications
You must be signed in to change notification settings - Fork 0
WKWebView
Ken Harris edited this page Sep 8, 2020
·
22 revisions
WebView
(on Mac) is the old WebKit view that runs entirely in-process. WKWebView
is the new hotness that runs in its own process, for performance and security (so they claim). It has a number of rather significant downsides which made it useless to me for the first several years. Even in 2020, it lags WebView in features, in many ways:
-
It ignores custom[NS]URLProtocol
s. It'll load the protocol and claim to support it, but then ignore it completely.- In 10.13, there's a WKURLSchemeHandler! Note that the interface is completely different -- this is re-architecting, not just updating some method names.
-
Xcode 8 can't add it in IB.(FB5550470)- Xcode 9 can! ... sort of.
- You get a "Reload" context menu (and "Open in New Window", etc?), and it's not easy to disable (FB8653798)
- Printing is broken (36557179)
- No way to use a user stylesheet (37652333)
- To set any configuration on it (like a WKURLSchemeHandler), you need to pass that configuration to its
init
, which means you can't create it in IB. (FB8653162) - Requires the
security.network.client
entitlement even for displaying static text. (FB8653139)