Add <img> to Gefest's primitives

This commit is contained in:
FullGreaM 2026-04-27 01:49:05 +03:00
parent 5f551af2b3
commit 150bb7a0a9

View File

@ -0,0 +1,13 @@
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>`;
}
}