- WebPreferences *preferences([webview preferences]);
-
- bool maybe([preferences javaScriptCanOpenWindowsAutomatically]);
- [preferences setJavaScriptCanOpenWindowsAutomatically:NO];
-
- /*id _private(MSHookIvar<id>(webview, "_private"));
- WebCore::Page *page(_private == nil ? NULL : MSHookIvar<WebCore::Page *>(_private, "page"));
- WebCore::Settings *settings(page == NULL ? NULL : page->settings());
-
- bool no;
- if (settings == NULL)
- no = 0;
- else {
- no = settings->JavaScriptCanOpenWindowsAutomatically();
- settings->setJavaScriptCanOpenWindowsAutomatically(true);
- }*/
-
- if (UIWindow *window = [[self view] window])
- if (UIResponder *responder = [window firstResponder])
- [responder resignFirstResponder];