function getContext(canvas, opt_attribs) {
  var gl = createContext(canvas, opt_attribs);
  return gl;
}
Gets a WebGL context.  Will create a WebGL2 context if possible.

You can check if it's WebGL2 with

   function isWebGL2(gl) {
     return gl.getParameter(gl.VERSION).indexOf("WebGL 2.0 ") == 0;
   }

Note: For a WebGL1 context will attempt to enable Vertex Array Objects
and add WebGL2 entry points. (unless you first set defaults with
`twgl.setDefaults({enableVertexArrayObjects: false})`;

@param {HTMLCanvasElement} canvas a canvas element.
@param {WebGLContextAttributes} [opt_attribs] optional webgl context creation attributes
@return {WebGLRenderingContext} The created context.
@memberOf module:twgl