NEW178601
Make setStorageBlockingPolicy a public API
https://bugs.webkit.org/show_bug.cgi?id=178601
Summary Make setStorageBlockingPolicy a public API
Dan Saunders
Reported 2017-10-20 13:05:15 PDT
Third party content we load in WKWebView has a dependency of being able to use localStorage from an iframe. Currently, WKWebView is configured to isolate iframe localStorage, data is not able to be shared between the iframe and the same domain loaded in a main frame from another instance of WKWebView. WebView did not have this policy, the same site we load in WebView is working and able to share localStorage between the iframe and main frame of same domain. Safari in Sierra had "Cookies and website data" setting configurable to allow iframes to access localStorage, but it looks like in High Sierra this setting was removed and localStorage works by default in iframes. WKWebView still defaults to block the iframe storage in High Sierra, we should be able to configure it. This setting causes issue, as no other browser implements it. You can have a site work in Chrome/IE/Firefox but not work in WKWebView due to this. typedef NS_ENUM(NSInteger, _WKStorageBlockingPolicy) { _WKStorageBlockingPolicyAllowAll, _WKStorageBlockingPolicyBlockThirdParty, _WKStorageBlockingPolicyBlockAll, } WK_API_AVAILABLE(macosx(10.10), ios(8.0)); @interface WKPreferences (WKPrivate) @property (nonatomic, setter=_setStorageBlockingPolicy:) _WKStorageBlockingPolicy _storageBlockingPolicy;
Attachments
Note You need to log in before you can comment on or make changes to this bug.