JavaScript helper to communicate between JavaScript and Cocoa app.