Are you sure gl.commit is WebAssembly only? That doesn’t seem right to me, but I could be wrong:
https://hacks.mozilla.org/2016/01/webgl-off-the-main-thread/
What is TPTB?
SIMD is another WebAssembly only API, hopefully coming soon.
What is TPTB?
SIMD is another WebAssembly only API, hopefully coming soon.
That blog post you linked to is 2 years old and out of date with what browser are actually planning on shipping.
For JS you no longer need commit at all. canvas (both 2d and webgl) work offsrcreen just like they do without offscreen. You render, when your event exits the changes get magically propagated to the corresponding canvas. commit is solely for when your event never exits (you're in a spinloop)