Constructor
new Destroyer(componentsopt, onInvalidComponentsopt)
Example
var destroyer = new App.component.Destroyer([widget]);
destroyer.destroy();
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
components |
array |
<optional> |
[]
|
list of components (JS object reference) to be destroyed |
onInvalidComponents |
function |
<optional> |
Destroyer._logWarning
|
function |
Methods
(static) isDestroyable(component) → {boolean}
Checks to see if the component has a destroy() method
Parameters:
| Name | Type | Description |
|---|---|---|
component |
object |
Returns:
true if destroy method exists on the component, false otherwise
- Type
- boolean
addAll(components)
Adds components to be destroyed
Parameters:
| Name | Type | Description |
|---|---|---|
components |
array | list of components to be destroyed |
destroy()
Destroys all components currently in the list