Skip to content

Instantly share code, notes, and snippets.

@M507
Created June 27, 2024 20:17
Show Gist options
  • Save M507/07a234cc1dd75ef41a49222b5a8600ad to your computer and use it in GitHub Desktop.
Save M507/07a234cc1dd75ef41a49222b5a8600ad to your computer and use it in GitHub Desktop.
ObjC.choose(ObjC.classes['WKWebView'], {
onMatch: function (wk) {
console.log('onMatch: ', wk);
console.log('URL: ', wk.URL().toString());
console.log('javaScriptEnabled: ', wk.configuration().preferences().javaScriptEnabled());
console.log('allowFileAccessFromFileURLs: ',
wk.configuration().preferences().valueForKey_('allowFileAccessFromFileURLs').toString());
console.log('hasOnlySecureContent: ', wk.hasOnlySecureContent().toString());
console.log('allowUniversalAccessFromFileURLs: ',
wk.configuration().valueForKey_('allowUniversalAccessFromFileURLs').toString());
},
onComplete: function () {
console.log('done for WKWebView!');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment