canvas.getContext("webgl") is undefined

Fixed Issue #12125200


Nolan L.
May 25, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

  1. Go to
  2. Notice the demo works in Firefox/Chrome/Safari but shows nothing in Edge.

The error in console appears to be “Unable to get property ‘enable’ of undefined or null reference” caused by:

var canvas = document.querySelector("canvas");
canvas.width = canvas.offsetWidth;
canvas.height = canvas.offsetHeight;
var gl = canvas.getContext("webgl");

I’ve repro’d in Edge 16199.100 as well as 15063.2.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “Christian F.”

      Changed Assigned To from “Christian F.” to “Rafael C.”

    • If I look at the MSDN diocumentation, it sends me to the Mozilla description of WebGL.

      Load the Mozilla getting started page into Edge, and you will get an alert that webgl failed:

      The failure is canvas.getContext(“webgl”); Edge returns null.

      I go to Mozilla’s description of getContext():

      It shows that getContext(“webgl”) used to be getContest(“experimental-webgl”).

      If I use canvas.getContext(“experimental-webgl”) in a clone of the Mozilla example, it works.

    • To make it a little clearer, fixing this bug is a one-liner.

      Just make add the string “webgl” so getContext(“webgl”) and getContext(“experimental-webgl”) return the same context.

    • Microsoft Edge Team

      Changed Status to “Fixed”

    • Hello,

      Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge and available in Insider Preview build 17046.

      Best Wishes,
      The MS Edge Team

    You need to sign in to your Microsoft account to add a comment.

    Sign in