You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
457 B
JavaScript
22 lines
457 B
JavaScript
import {HTMLImageElement} from '../html/image-element.js';
|
|
|
|
export const ImageClass = ownerDocument =>
|
|
/**
|
|
* @implements globalThis.Image
|
|
*/
|
|
class Image extends HTMLImageElement {
|
|
constructor(width, height) {
|
|
super(ownerDocument);
|
|
switch (arguments.length) {
|
|
case 1:
|
|
this.height = width;
|
|
this.width = width;
|
|
break;
|
|
case 2:
|
|
this.height = height;
|
|
this.width = width;
|
|
break;
|
|
}
|
|
}
|
|
};
|