Fix bug of setValue and make demo.html runnable from the browser without any quickfix in the code for users