setupWebGL = function (canvas, optAttribs) {
  // const showLink = function (str) {
  //   var container = canvas.parentNode;
  //   if (container) {
  //     container.innerHTML = makeFailHTML(str);
  //   }
  // };

  if (!window.WebGLRenderingContext) {
    // showLink(GET_A_WEBGL_BROWSER);
    return null;
  }

  var context = create3DContext(canvas, optAttribs);
  if (!context) {
    // showLink(OTHER_PROBLEM);
    return null;
  }
  return context;
}
Creates a webgl context. If creation fails it will
change the contents of the container of the <canvas>
tag to an error message with the correct links for WebGL.
@param {Element} canvas. The canvas element to create a
    context from.
@param {WebGLContextCreationAttirbutes} optAttribs Any
    creation attributes you want to pass in.
@return {WebGLRenderingContext} The created context.