function createShaderFromScript(gl, scriptId, opt_shaderType, opt_errorCallback) {
  var shaderSource = "";
  var shaderScript = getElementById(scriptId);

  if (!shaderScript) {
    throw new Error("unknown script element: ".concat(scriptId));
  }

  shaderSource = shaderScript.text;
  var shaderType = opt_shaderType || getShaderTypeFromScriptType(gl, shaderScript.type);

  if (!shaderType) {
    throw new Error('unknown shader type');
  }

  return loadShader(gl, shaderSource, shaderType, opt_errorCallback);
}
Loads a shader from a script tag.
@param {WebGLRenderingContext} gl The WebGLRenderingContext to use.
@param {string} scriptId The id of the script tag.
@param {number} [opt_shaderType] The type of shader. If not passed in it will
    be derived from the type of the script tag.
@param {module:twgl.ErrorCallback} [opt_errorCallback] callback for errors.
@return {WebGLShader?} The created shader or null if error.
@private