#1108: Add restartGame and cleanScript API for web