title: WebGl "ERROR: unsupported shader version"
body: <p>I just started using webgl and am following this <a href="https://webgl2fundamentals.org/webgl/lessons/webgl-fundamentals.html" rel="nofollow noreferrer">tutorial</a>, but I'm running into a strange error message. <code>ERROR: unsupported shader version</code>.
  The VertexShader looks like this:</p>
  
  <pre><code> var vertexShaderSource = `#version 300 es
  
    // an attribute is an input (in) to a vertex shader.
    // It will receive data from a buffer
    in vec4 a_position;
  
    // all shaders have a main function
    void main() {
  
      // gl_Position is a special variable a vertex shader
      // is responsible for setting
      gl_Position = a_position;
    }
    `;
  </code></pre>
  
  <p>and the fragment shader looks like this:</p>
  
  <pre><code> var fragmentShaderSource = `#version 300 es
  
    // fragment shaders don't have a default precision so we need
    // to pick one. mediump is a good default. It means "medium precision"
    precision mediump float;
  
    // we need to declare an output for the fragment shader
    out vec4 outColor;
  
    void main() {
      // Just set the output to a constant reddish-purple
      outColor = vec4(1, 0, 0.5, 1);
    }
    `;
  </code></pre>
  
  <p>They are then converted to shaders with the following function, with then logs the error mentioned above: </p>
  
  <pre><code>function createShader(gl,type,source) {
    var shader = gl.createShader(type);
    gl.shaderSource(shader,source);
    gl.compileShader(shader);
    var success = gl.getShaderParameter(shader,gl.COMPILE_STATUS);
    if(success) {
      return shader;
    }
    console.log(gl.getShaderInfoLog(shader));
    gl.deleteShader(shader);
  }
  </code></pre>
  
  <p>I really hope you can help me with this, and thanks in advance.</p>