While we could certainly write our own JavaScript library to use WebSockets to receive the controller frame data from the service's built-in WebSocket server, that would be a colossal waste of our efforts given the fact that there exists such a library already: LeapJS.
LeapJS is an open source library that contains routines and interfaces to make it easy to do absolutely anything anyone might want to do, with the controller in the land of JavaScript. Modules are provided for both HTML5 clients as well as Node.js applications, providing Leap support on the frontend and backend. The frame data, once received, is structured to match the C++, Objective-C, and SWIG-based interfaces that we have already studied.
Receiving the controller frame data and making use of it is even simpler than compiling C++ Leap-based applications; all that is needed is a web browser and a text editor. Though before we float down the calm river of client-side Leap development, we should affix the LeapJS outboard...