HTML test environment and first version of javascript api

This file should probably be located in another folder, called `js` or `jslib`