Added target attribute support. Ignite Object now supports setProperties. Added null check for props. Fixed some documentation wording.

This commit is contained in:
2021-09-22 09:43:18 -07:00
parent 46ff7743a1
commit 31503e62d1
3 changed files with 39 additions and 4 deletions

View File

@ -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]);
}
}