return -1 when no battery
clear canvas when deleting context
emscripten tests configure support