On Sun, Oct 19, 2008 at 8:33 AM, Benjamin Dobson
<[EMAIL PROTECTED]> wrote:
> If I enable JavaScript in my WebView, it exits with status 2, after printing
> "Debugger() was called!" to the console. When I disable it, it works fine –
> but without JavaScript. My code (URL given as an example):
>
>        [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL
> URLWithString:@"http://www.w3schools.com/js/js_examples.asp";]]];
>
> That's it. Simply loading the page crashes the application. If this doesn't
> crash it, clicking on the "Next" link at the bottom
> will.

Works fine for me. Simple Cocoa application, create the proper
connections, and put this in the app delegate:

- (void) applicationDidFinishLaunching:(NSNotification*)aNotification
{
    NSLog( @"isJavaScriptEnabled = %d", [[webView preferences]
isJavaScriptEnabled] );
    [[webView mainFrame] loadRequest:[NSURLRequest
requestWithURL:[NSURL
URLWithString:@"http://www.w3schools.com/js/js_examples.asp";]]];
}

Console prints a 1, and the page doesn't crash. I think your problem
lies with some other part of your code.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to