{ (void)webView; if (![message isKindOfClass:[NSDictionary class]]) return; NSLog(@"js: %@:%@: %@", [[message objectForKey:@"sourceURL"] lastPathComponent], [message objectForKey:@"lineNumber"], [message objectForKey:@"message"]); }
On 22-Dec-07, at 8:14 AM, Todd Ditchendorf wrote:
In a Cocoa app which embeds a WebView, what is the best way to catch all JS exceptions from the WebView which are thrown and are not caught within JS itself?For example, I want to implement something similar to the JavaScript Console in the Safari debug menu.Also, how do you capture statements sent to console.log(), console.warn() and console.error() within a WebView?thanks! todd ditchendorf _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev