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 ...
One of the lesser known little features in OS X Yosemite is the new ability to use JavaScript for automating tasks with AppleScript. This is an awesome way to extend your AppleScript automation, but ...