(refs #32)Add JavaScript API