Canvas height attribute
Definition and usage
height
The property returns the height of the ImageData object in pixels.
Tip:See also createImageData(),getImageData() and putImageData() Methods, to learn more about the ImageData object.
Example
Output the height of the ImageData object:
alert("Width of imgData is: " + imgData.height);
Syntax
imgData.height;
Technical details
Default value: | #000000 |
---|
Browser support
Table numbers indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
4.0 | 9.0 | 3.6 | 4.0 | 10.1 |
Bemærk:Internet Explorer 8 og tidligere versioner understøtter ikke <canvas>-elementet.