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: Binding to Javascript variables in a WebView



Hi Ken,

A little while ago I contributed some patches to improve support for Cocoa Bindings in WebKit.  They made it in to the nightly builds, but remain undocumented - I just haven't had much time to contribute lately.

But, I just put together a sample app to demonstrate things... available at http://end.com/~speth/_javascript_Bindings.zip

It binds some cocoa controls to _javascript_ values, and uses getters/setters in the _javascript_ to do the interesting stuff.  I hope it's somewhat clear what's going on.  The sample also includes a quick and dirty plugin class to allow _javascript_ to manually trigger key-value change notifications.  Try clicking on the images that show up in the WebView to see it in action.

The project expects that you have one of the nightly dmg's mounted as /Volumes/WebKit, so it can set the framework path environment variables when running the executable.

Also, feel free to ask me questions.  I'm still interested in making this support better, and getting it into the documentation, so feedback would be great.

Jim
- looking for a Cocoa development job in NYC


On Oct 7, 2006, at 1:44 AM, Ken Tozier wrote:

Hi

I have an html page that presents a couple of custom controls inside a WebView and would like to use bindings to these controls in my Cocoa application. Is this possible? If so, does anyone have a few simple examples or links?

Thanks

Ken

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

This email sent to email@hidden

References: 
 >Binding to Javascript variables in a WebView (From: Ken Tozier <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.