I have a simple script which selects all canvases in my document. I want to loop through them and adjust their width and height.
I was hoping someone could explain how I can access the properties of the canvas so I can change them. I tested it with this:
var d = document.getElementsByTagName('canvas');
for (var i=0, max=d.length; i < max; i++) {
console.log(d[i].style.width); // blank
}
The problem is, my console.log shows blank lines, so I'm a bit confused. I hope you can explain where I am going wrong here.