JavaScriptCocoaBridge

last edited March 8, 2007 04:32:54 (62.101.126.215)
CocoaDev is sponsored by: Panic: Shockingly good Mac software!

CocoaGlossary:Languages (Bridges) - Apple's Cocoa bridge for JavaScript

As of version 10.4 "Tiger", MacOS X includes a JavaScript Cocoa bridge which allows Dashboard Widgets to communicate with Objective-C objects.


The bridge is available as part of WebKit, but cannot be used separately from WebKit classes (as the JavaScriptCore framework that handles such things is private); you have to create a WebView and program things within the HTML page using the API to evaluate JavaScripts. See the docs for the WebScripting? protocol and Dashboard plugin creation for more info.