[webkit-dev] extending webkit
Darin Adler
darin at apple.com
Mon Mar 24 16:47:21 PDT 2008
On Mar 19, 2008, at 10:50 PM, wang gang wrote:
> Is there a way to extend webkit so as to enable the browser or
> widgets (like the ones on Mac) to access the native functionalities
> of the machine?
Sure, if you're developing the program using WebKit. The
JavaScriptCore API can be used to add new objects and functions to
JavaScript.
Safari does this on Mac OS X.
> scenario 1: in the browser, a piece of js code can invoke certain
> apis to make phone calls or send/receive sms on a mobile phone which
> has webkit ported and served as the base of the browser.
> scenario 2: a widget reads from the local PIM database on the
> phone and shows contact or calendar info.
>
> The basic idea is to provide necessary apis to be used by js code
> which can then access local data just as it does in getting remote
> info (like in ajax).
You can indeed do this with WebKit.
The details of how to do it depend on how you've done the WebKit port
to your platform.
-- Darin
More information about the webkit-dev
mailing list