Telogis.GeoBase.Objects |
A namespace enclosing GeoBase functions for manipulating objects. Normally, these would be attached to the Object prototype, but this is avoided to maintain compatibility with some other libraries.
Name | Description |
---|---|
freeHandlers (Object obj) | Iterates through all EventHandler objects registered as properties of the given object, destroying each and deleting references to break cycles and prevent memory leaks. Arguments
|
freeProperty (Object obj, String key) | Deallocates a property of an object in the manner appropriate to its type. If the property refers to an array, the elements of the array are freed individually; if it is a DOM element, it is safely detached from the page; if it is an object with a destroy method, this is executed. In all cases, the reference of the object to the freed property is deleted. Arguments
|
getPropString (Object obj, Number maxPropCount) | Gets a string describing an object by finding the names of its first few properties and forming a string such as '{prop1, prop2, prop3, prop4, ...}'. This is helpful in generating a useful error message when processing an object of critical but unknown type, e.g. during serialization. Arguments
String - A string describing Objects.getPropString.obj by its properties. |
isElement (Mixed elem) | Checks whether a given object is a DOM element by evaluating the types of its nodeType and nodeName properties. Arguments
Boolean - True if Objects.isElement.elem is a DOM element; false otherwise. |
lookupObject (String name, Object root) | Finds the globally-accessible object with the given name. For example, if Objects.lookupObject.name is specified as 'Objects.lookupObject', this function breaks this into individual properties and returns a reference to the function itself. Arguments
Mixed - The item referred to by the property-chain specified by Objects.lookupObject.name. |