We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25e9ed8 commit 988039eCopy full SHA for 988039e
src/gui/src/UI/UIElement.js
@@ -56,9 +56,10 @@ export default def(class UIElement extends AdvancedBase {
56
if ( attrs.text ) {
57
el.innerText = attrs.text;
58
}
59
- if ( attrs.style ) {
60
- el.setAttribute('style', attrs.style);
61
- }
+ ;['style', 'src'].forEach(attrprop => {
+ if ( ! attrs.hasOwnProperty(attrprop) ) return;
+ el.setAttribute(attrprop, attrs[attrprop]);
62
+ })
63
return el;
64
};
65
// === END :: Helpful convenient library ===
0 commit comments