JavaScript API for OMDoc-based Active Documents