Added target attribute support. Ignite Object now supports setProperties. Added null check for props. Fixed some documentation wording.
This commit is contained in:
@ -180,7 +180,15 @@ class IgniteElement extends HTMLElement {
|
||||
* Sets all the property values on this element.
|
||||
*/
|
||||
setProperties(props) {
|
||||
if (props) {
|
||||
if (props == null || props == undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (props instanceof IgniteObject) {
|
||||
props.update();
|
||||
|
||||
Object.getOwnPropertyNames(props).forEach(name => this[name] = props[name]);
|
||||
} else {
|
||||
Object.keys(props).forEach(name => this[name] = props[name]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user