UNPKG

apex4x

Version:

The Comprehensive ARIA Development Suite

28 lines 2.57 kB
�� Function: destroy(objectDCOrID, boolKeepInternalContent, boolBoundToElement) Description: Destroys a DC object that was previously created using $A(dcArray) or $A.toDC(). Returns: Boolean: True if successful, false otherwise. Note: If boolKeepInternalContent is false or undefined, or if the DC object is closed, destroy will clean and remove all internally stored DOM nodes associated with the DC object. If boolKeepInternalContent is true and the DC object remains open, all displayed content within the DC object will be preserved at its current location in the DOM before the associated DC object is destroyed. If boolBoundToElement is set to true, all DC objects that are bound to the triggering element passed as the first parameter will be destroyed. If a function is declared for DC.beforeDestroy(), this handler will automatically be executed before the destroy process is performed. Example: DC.beforeDestroy = function(DC) { // Do something before the DC object is destroyed. }; // Destroy the referenced DC object. $A.destroy(DC); // Or using the DC object id. $A.destroy("dcId"); // Destroy all DC objects bound to the referenced triggering element and remove their content. $A.destroy(domNodeForTriggeringElement, false, true);