dev: src prop for images

This commit is contained in:
KernelDeimos 2024-10-23 22:59:18 -04:00
parent 25e9ed8227
commit 988039eade

View File

@ -56,9 +56,10 @@ export default def(class UIElement extends AdvancedBase {
if ( attrs.text ) {
el.innerText = attrs.text;
}
if ( attrs.style ) {
el.setAttribute('style', attrs.style);
}
;['style', 'src'].forEach(attrprop => {
if ( ! attrs.hasOwnProperty(attrprop) ) return;
el.setAttribute(attrprop, attrs[attrprop]);
})
return el;
};
// === END :: Helpful convenient library ===