13 lines
406 B
TypeScript
13 lines
406 B
TypeScript
import { GefestElement } from "../element";
|
|
|
|
export class GefestImg extends GefestElement {
|
|
constructor(content : (GefestElement | string)[] | string, src: string) {
|
|
super(content);
|
|
this.setAttribute('src', src);
|
|
}
|
|
|
|
protected wrapHTML (content: string): string {
|
|
const attrString = this.attributesToString();
|
|
return `<img ${attrString}>${content}</img>`;
|
|
}
|
|
} |