Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Using a modified WebCore in the WebKit framework



>Even if this was technically possible, you don't have a license to the 
>Web Kit framework that permits you to redistribute it in this fashion.

Understood.  If there are custom license arrangements that can be made 
between Apple and 3rd parties for WebKit usage, could you forward a 
contact in your Developer Relations Dept. that would handle such 
arrangements?

>We will definitely provide a nice way to do that sort of thing easily 
>with a future version of the Web Kit.

Thanks.  If you could keep the dev list informed of such developments 
would be much appreciated.

Thanks for the 'hack' you described.  I have come across other 
developers describing similar techniques, but since the JS has to
also work on Windows, so my task becomes trying to make the hack 
be compatible with IE on Windows.  Currently I'm still looking for
the clean, direct solution that would require no changes to our
current web content.  But thanks for the insight.

Scott



-----Original Message-----
From: webcore-dev-bounces+stupaj=email@hidden
[mailto:webcore-dev-bounces+stupaj=email@hidden]On Behalf
Of Darin Adler
Sent: Tuesday, October 19, 2004 4:53 PM
To: Scott Tupaj
Cc: email@hidden
Subject: Re: Using a modified WebCore in the WebKit framework


On Oct 19, 2004, at 3:58 PM, Scott Tupaj wrote:

> I was hoping I would be able to ship my application
> with copies of _both_ WebKit and WebCore as _private_ frameworks in
> my application bundle, thus making my app immune to any Apple updates
> to the system WebKit.  To borrow a term from Microsoft, sort of the
> "side-by-side" dll concept.  Is this thinking flawed?

Even if this was technically possible, you don't have a license to the 
Web Kit framework that permits you to redistribute it in this fashion.

> My "custom Javascript" that I implemented was simply allowing the
> Microsoft Internet Explorer 'window.external.<function>()' to be
> recognized.  This JS calls a matching C function in the host
> application that is embedding the browser.  Since all of our web
> content requires that we can use JavaScript to automate the host
> (and pass return values back to JavaScript) I was hoping that this
> would be possible in WebKit.  Turns out, the changes to WebCore
> are pretty simple to allow this to happen.  I post a Cocoa
> notification that my host app receives that contains the function
> name and arbitrary parameter list, and populate the notification
> NSDictionary with a return value that I convert back into the JS
> interpreter code in WebCore.
>
> Any thought that Apple might provide such functionality in future
> WebKits?

We will definitely provide a nice way to do that sort of thing easily 
with a future version of the Web Kit.

There are even some hack-like techniques that work to do this with the 
current WebKit. Here's a sketch: In one of the delegate callbacks that 
indicates a page is loaded you can use 
stringByEvaluatingJavaScriptString: to set the value of window.external 
to a function that turns around and calls window.alert with a magic 
string. Then the WebView's UI delegate can notice the magic string and 
run the C code. To send the result back you then can use 
stringByEvaluatingJavaScriptString:  to set a JavaScript global. It's a 
bit painful but developers have done it successfully.

     -- Darin

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webcore-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webcore-dev/email@hidden

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webcore-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webcore-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.