Flamingo.Utils.extend()¶
The extend() method adds specified set of properties to any JavaScript object.
Syntax¶
Flamingo.Utils.extend(target, options, deep)
Parameters¶
Parameter | Type | Description |
target | Object | The object to which extra properties should be added. |
options | Object | Properties that should be added to the object. |
deep | Boolean | If TRUE, merging of properties becomes recursive. |
Return Value¶
Type | Description |
---|---|
Object | Target object with extended properties. |
Example¶
You need to add the following code to your template to add more properties to your JavaScript object:
<!--{
var myObj = {name: "My Object"};
Flamingo.Utils.extend(myObj, {anotherProperty: "New Property"});
}-->
See also