Hi folks,
I'm relatively new to Javascript, and I'm trying to use jsdom, node.js, and canvas together on a Linux server.
I installed jsdom 0.8.11, canvas 1.1.3, and Node 0.10.7.
Here's my test code:
var jsdom = require("jsdom");
jsdom.env('<canvas id="myCanvas" width="300" height="300"></canvas>', [], function(errors, window) {
console.log(window.document.getElementById("myCanvas"));
});
With canvas installed, I can't get this to output anything except 'null'. Interestingly, if I don't have canvas installed, then this code prints a bunch of stuff, including " _nodeName: 'canvas',".
Any ideas what I'm doing wrong?
Thanks,
Dave