clone of common helpers, Methods Webix Docs
makes a shallow copy of an object
object clone(object source);
| object | the copy of the source object |
Example
var obj1 = {name:"flower", type:"rose", colors: ['red','pink','white','yellow'] }
var obj2 = webix.clone(obj1);
obj1.type = 'tulip';
obj1.type // -> 'tulip'
obj2.type // -> 'tulip'
obj2.colors // -> ['red'] Warning! It's a shallow copy
See also