-
Notifications
You must be signed in to change notification settings - Fork 23k
Open
Labels
Content:WebAPIWeb API docsWeb API docsaccepting PRFeel free to open a PR to resolve this issueFeel free to open a PR to resolve this issuegood first issueA good issue for newcomers to get started with.A good issue for newcomers to get started with.
Description
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D
What specific section or headline is this issue about?
https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D#examples
What information was incorrect, unhelpful, or incomplete?
Using the id "canvas" (as in <canvas id="canvas"></canvas>) might cause some people to create something like
<div id="canvas"> and then getting the error getContext is not a function when running
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
I guess I was not the only one running into this error since this answer on StackOverflow getContext is not a function also got 103 upvotes
What did you expect to see?
<canvas id="myCanvas">
or
<canvas id="canvasArea"> (so that it's different from w3schools)
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
bsmth
Metadata
Metadata
Assignees
Labels
Content:WebAPIWeb API docsWeb API docsaccepting PRFeel free to open a PR to resolve this issueFeel free to open a PR to resolve this issuegood first issueA good issue for newcomers to get started with.A good issue for newcomers to get started with.
Type
Projects
Status
No status