Come Use Our Code #3: WebGL Shader Compiler
Continuing our series of highly generic game library stuff, here is a class that can compile shaders in WebGl. You can find trillions of examples on the internet, and here is another. It features some degree of error-checking, and it has what I think at least is a nice interface. :)
https://github.com/Atomotron/ld47-prep/blob/master/shadercompiler.js