initial untested code for egl/emscripten support