Skip to content

Instantly share code, notes, and snippets.

@pejorativefox
Created March 8, 2013 23:05
Show Gist options
  • Save pejorativefox/5120772 to your computer and use it in GitHub Desktop.
Save pejorativefox/5120772 to your computer and use it in GitHub Desktop.
displayNode = $("#display");
canvasNode = $("<canvas id='canvas1'></canvas>");
canvasNode.attr("width", width);
canvasNode.attr("height", height);
displayNode.append(canvasNode);
context = canvasNode('canvas1').getContext("2d");
canvasNode = document.createElement("canvas");
context = canvasNode.getContext("2d");
displayNode = document.getElementById("display");
canvasNode.setAttribute("width", width);
canvasNode.setAttribute("height", height);
displayNode.appendChild(canvasNode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment