[webkit-dev] WKWebView Inspector in my own app
Joseph Pecoraro
pecoraro at apple.com
Mon Aug 11 12:21:26 PDT 2014
> On Aug 11, 2014, at 12:10 PM, Joseph Pecoraro <pecoraro at apple.com> wrote:
>
>
>> On Aug 11, 2014, at 3:23 AM, Koen Bok <koen at madebysofa.com <mailto:koen at madebysofa.com>> wrote:
>>
>> I am looking how to show the inspector in my own mac desktop app with WKWebViews.
>
> You are correct that currently the only supported way to inspect a WKWebView is through Safari with an entitlement in your app (see the WWDC talk for more information).
>
>
>> I think I need to initialize an XPC or http connection to a WKWebView and pass it to a new inspector instance, and then show it.
>>
>> Can anyone maybe point me in the right direction?
>
> From a WebKit Internals perspective, you just need to enable WebCore's Settings::developerExtrasEnabled setting to get what you want. No XPC/HTTP connections necessary.
>
> The WKWebView API allows toggling WebCore's Settings via the WKPreferences interface (available on WKWebViewConfiguration). Nothing currently exists for the developer extras setting. It should be easy to add plumbing for a new setting to toggle the Developer Extras Enabled setting at least as a private API.
I filed and put a patch up on:
<https://webkit.org/b/135811> Add Private WKPreferences API for developer extras (show inspector)
- Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20140811/201f51cf/attachment.html>
More information about the webkit-dev
mailing list