Re: questions on WebView for Mac apps
Re: questions on WebView for Mac apps
- Subject: Re: questions on WebView for Mac apps
- From: email@hidden
- Date: Wed, 30 Sep 2015 14:35:56 +0900
The lack of native DOM API is the head scratcher at first.
It leaves you with a message passing API to use the JSContext Objective-C JavaScript API.
Then you realize it's a performance and security thing and it's pretty much the same as the Safari Extensions API . Web views in WKWebView are actually a separate process pool you don't own.
So you can translate the DOM stuff back to JavaScript DOM stuff
Alternatively you could try delving in to WebKit source code to redeclare private classes and methods but it's a big code base. And the message passing probably translates to XPC at some level.
Sent from my iPhone
> On Sep 30, 2015, at 12:28 PM, Jens Alfke <email@hidden> wrote:
>
>
>> On Sep 29, 2015, at 8:15 PM, Roland King <email@hidden> wrote:
>>
>> is WebView the go-to guy these days or is it WKWebView, which comes with all the things you love about the Safari browsing experience built-in? That seems pretty easy to use. There was a WWDC video on it if I remember correctly.
>
> WKWebView looks easier to use, but extremely limited. I was pretty disappointed by the API. It doesn’t look useable for much more than just showing regular web pages (as opposed to building hybrid apps that use HTML for part of their rendering.) Last I saw, the PhoneGap people were still scratching their heads trying to figure out how to use it, since it doesn’t even work with NSURLProtocols.
>
> (I’m working on a Mac app that uses WebView for much of its UI, and was hoping I could use WKWebView to port it to iOS, but no dice. My app relies heavily on manipulating the DOM from Objective-C.)
>
> ―Jens
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden