Bug 137612 - Add a way to show the web inspector from code with WKWebView
Summary: Add a way to show the web inspector from code with WKWebView
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: All Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-10-10 08:04 PDT by Koen Bok
Modified: 2022-10-11 00:07 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Koen Bok 2014-10-10 08:04:52 PDT
There does not seem to be a way to show the web inspector from code. The current only way is to right click in the WKWebView and select "Inspect Element" from the menu.

This used to be pretty easy with the old WebView:

    WebInspector *inspector = [[WebInspector alloc] initWithWebView:webView];
    [inspector showConsole:self];

I would love some simple way like [webView showInspector:] or private like  [webView _showInspector:]

I know it should probably possible today by calling some internal methods, but I haven't been able to figure that out. Hints would be really appreciated.
Comment 1 Radar WebKit Bug Importer 2014-10-10 08:05:22 PDT
<rdar://problem/18610236>