WebGL defaults to the same as images and canvas 2D, namely it expects the contents of the canvas to be RGBA, it expects RGB to be premultiplied by the alpha (in other words if the alpha is zero the RGB has to also be zero since anything times zero equals zero). And finally blends with whatever is behind it with GL_ONE, GL_ONE_MINUS_SOURCE_ALPHA.
If you want want it different you have 2 options
Tell WebGL not to have alpha
You do this by creating a context with no alpha
gl = canvas.getContext("experimental-webgl", { alpha: false });
This is probably the best option for your case. Since there will be no alpha there's no blending required which is faster than blending with the background which is what the browser normally has to do.
Tell WebGL your RGB values are not premultiplied
gl = canvas.getContext("experimental-webgl", { premultipledAlpha: false });
This means the browser will still blend your WebGL canvas with the background, it will just do it with GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA instead. You'll still see the green behind.
There's a few other solutions that might be useful in special cases
If you need alpha in the destination for some calculations you can clear the alpha to 1 when you're done
...render scene... gl.colorMask(false, false, false, true); gl.clearColor(0, 0, 0, 1); gl.clear(gl.COLOR_BUFFER_BIT);
The blending will still be happening you just won't see it because all your alpha is set to 1. Not the best solution but if you need destination alpha it might be your only solution.
If you don't want to see through to stuff behind the canvas then give the canvas a background color
<canvas style="background-color: green;"></cavnas>
Setting the canvas' background color to say black would also do it but that's also a waste because it would still be blending your canvas with black. If that's what you want then just turn the alpha off in the first place.