Created
February 28, 2011 15:58
-
-
Save moyashi/847513 to your computer and use it in GitHub Desktop.
Safariで表示中のWebViewにJavaScriptを実行させる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[[[BrowserDocumentController sharedDocumentController] frontmostBrowserDocument] currentBrowserWebView] stringByEvaluatingJavaScriptFromString:@"alert(1)"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Class BrowserDocumentController = objc_getClass ("BrowserDocumentController");
id browserController = [BrowserDocumentController sharedDocumentController];