add more ways to control the viewer from JavaScript