HTML test environment and first version of javascript api

spaces instead of tabs. Same throughout the file