[webkit-dev] WKWebView Inspector in my own app
I am looking how to show the inspector in my own mac desktop app with WKWebViews. 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? PS. I also made a Stack Overflow question for this: http://stackoverflow.com/questions/25200116/how-to-show-the-inspector-within-your-wkwebview-based-desktop-app ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] WKWebView Inspector in my own app
On Aug 11, 2014, at 3:23 AM, Koen Bok k...@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. - Joe ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] WKWebView Inspector in my own app
On Aug 11, 2014, at 12:10 PM, Joseph Pecoraro pecor...@apple.com wrote: On Aug 11, 2014, at 3:23 AM, Koen Bok k...@madebysofa.com mailto:k...@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 ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] WKWebView Inspector in my own app
This is great! Thank you very very much. On Monday, August 11, 2014, Joseph Pecoraro pecor...@apple.com wrote: On Aug 11, 2014, at 12:10 PM, Joseph Pecoraro pecor...@apple.com javascript:_e(%7B%7D,'cvml','pecor...@apple.com'); wrote: On Aug 11, 2014, at 3:23 AM, Koen Bok k...@madebysofa.com javascript:_e(%7B%7D,'cvml','k...@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 ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev
[webkit-dev] How do I find a WebView's desired size?
This is for implementing the windowWillUseStandardFrame:defaultFrame: method on OS X, which enables the green button to do an optimized zoom. How can I find out what height and width a WebView wants to be if it had infinite screen space? If it negotiates the size instead, assume that the maximum width is X and height is Y (which I would compute within windowWillUseStandardFrame:defaultFrame:). These views have scrollbars within their window, so they must have an internal notion of what size they want to be. This has to work whether or not the WebView is showing either HTML or anything else. Asking a similar question on the Cocoa list, a respondent lamented that web browsers these days just punt on the question and go full screen. I don’t want to do that. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev