This documentation is the working space for the next version of the Infusion code and is being updated to reflect ongoing changes. As a result, it may contain information that is not relevant to the latest release, 1.4. For documentation related to v1.4 and earlier, please see the Infusion v1.4 Documentation.

If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki

Skip to end of metadata
Go to start of metadata

fluid.copy(tocopy)

Performs a deep copy (clone) of the object passed in the argument.

File name: Fluid.js

Parameters

tocopy (Object) The object to be copied

Return Value

Object The copied object

See Also


Notes

This function recursively copies the contents of tocopy into a new object of the same type.

Example

In this example, fluid.copy() is being used to preserve a copy of a model. This can be useful for scenarios where some kind of 'revert' or 'undo' might be desirable.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.