Destroying the widget
The UE.destroy() method allows you to completely remove the widget instance from the DOM (Document Object Model).
Introduction
When you call this method, the widget iframe and its associated UI elements are removed from the page.
Important: After the widget has been destroyed, the global
UEobject and its methods will no longer be available. You cannot re-initialize the widget without reloading the page or re-running the initialization script.
Method signature
UE.destroy();
- Arguments: None.
Example usage
// Remove the widget completely
if (typeof UE !== 'undefined') {
UE.destroy();
}