mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
dev: src prop for images
This commit is contained in:
parent
25e9ed8227
commit
988039eade
@ -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 ===
|
||||
|
Loading…
Reference in New Issue
Block a user