happy-dom-without-node
Version:
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
25 lines • 589 B
JavaScript
import HTMLImageElement from './HTMLImageElement.js';
/**
* Image as constructor.
*
* Reference:
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image.
*/
export default class Image extends HTMLImageElement {
/**
* Constructor.
*
* @param [width] Width.
* @param [height] Height.
*/
constructor(width = null, height = null) {
super();
if (width !== null) {
this.width = width;
}
if (height !== null) {
this.height = height;
}
}
}
//# sourceMappingURL=Image.js.map