Is there a way to use the WebKit web inspector from a Cocoa WebView object?

后端 未结 5 1017
时光取名叫无心
时光取名叫无心 2020-12-04 09:40

I would like to use the WebKit web inspector in a custom browser based on WebKit on OS X. Is it possible to use the web inspector on a webview object? If so, how?

5条回答
  •  日久生厌
    2020-12-04 10:01

    in my case (MacOSX 10.6.5) it didn't work.

    I had to do the following in the windowDidLoad method of my webView WindowController:

    /* Initialize webInspector. */
    [[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"WebKitDeveloperExtras"];
    [[NSUserDefaults standardUserDefaults] synchronize];
    

提交回复
热议问题