Steps to reproduce
Try this example from MDN ( https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D ):
var canvas = document.getElementById(“canvas”);
var ctx = canvas.getContext(“2d”);
var p = new Path2D(“M10 10 h 80 v 80 h -80 Z”);
Comments and activity
- Microsoft Edge Team
Changed Assigned To to “Brad E.”
Thanks for the feedback on Edge. When I run this code sample you provided to us, I get:
Unable to get property ‘getContext’ of undefined or null reference
Returned in both Chrome Canary 54 and Edge 10586.
Am I missing any steps in this repro?
The code snippet is the relevant part from the linked page. Obviously you can’t call that in isolation since you need a canvas for the very first statement to work.
The above example implies that you have a html page with a canvas element with id canvas - hence the error you get that it’s undefined.
I think it would be easier for you to confirm the bug by going to the url above the sample. Then scroll down to “Using SVG data” and look at the rectangular output below the sample code.
Working a little too fast that day. Sorry. I am able to repro.
Have a simple reduction here:
Thank you for your feedback, guys.
- Microsoft Edge Team
Changed Assigned To to “Rick J.”
Changed Assigned To from “Rick J.” to “Christian F.”
Any ETA on this? Working a project for work right now and this is a must.
Any updates on supporting the full spec of Path2D?
I have 2 paths in my code now. One is using Path2D for my shapes and is currently commented out (because of this issue) and the other is Canvas shape drawing tools (which is much more verbose). Using the Canvas method till Edge supports Path2D. This is important. Writing code for Internet Explorer in the past was always a compromise and frustrating. Edge is supposed to be better. Please bring feature parity to Edge for Path2D. Thank you.
Hi Edge Team, is there any updates, or are you working on this fix? Thanks.
Also stumbeling over that bug … waiting for fix. Thanks.
You should at least correct the Platform Status to read "Partially Supported". But the Platform status page says “Supported” and links to the MDN documentation that describes the Path2D constructor that takes an SVN string.
In the meantime this …
… might be of some help. No need to donate.
Since it’s almost two years since you could reproduce the problem, are there any plans for a fix?
Need this feature! Please hurry. Thank You.