JavaScript for Automation on OS X Yosemite

As detailed by Apple in a technical document, OS X Yosemite will add JavaScript support for scripting and automation:

The JavaScript OSA component implements JavaScript for Automation. The component can be used from Script Editor, the global Script Menu, in the Run JavaScript Automator Action, applets/droplets, the osascript command-line tool, the NSUserScriptTask API, and everywhere else other OSA components, such as AppleScript, can be used. This includes Mail Rules, Folder Actions, Address Book Plugins, Calendar Alarms, and Message Triggers.

From the developer session video's description:

With OS X Yosemite, application scripting support has been added to another popular language, JavaScript. JavaScript for Automation (JXA) extends the standard JavaScript environment provided by the JavaScriptCore framework with support for querying and controlling all of the scriptable applications running in OS X. JXA scripts are supported at all layers of the system and can be invoked from the command-line, from the system-wide Script Menu, and can even be distributed as code-signed applications.

This is an interesting change for automation on OS X going forward, and JavaScript will be available alongside AppleScript in the Script Editor. You can watch the session video “JavaScript for Automation” here or in Apple's WWDC app.

Source: developer.apple.com