Document the JavaScript API