Skip to content

Instantly share code, notes, and snippets.

@d6rkaiz d6rkaiz/gist:836774
Created Feb 21, 2011

What would you like to do?
JavaScript Alert & Confirm
- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message
NSRunAlertPanel(@"JavaScript alert", message, @"OK", nil, nil);
- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message
int choice = NSRunAlertPanel(@"JavaScript confirm", message, @"OK", @"Cancel", nil);
return choice == NSAlertDefaultReturn;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.