# element.destroy()

> Use this method to destroy the Element instance and release all resources, and cannot be mounted again.

Use this method to destroy the Element instance and release all resources, and cannot be mounted again. Calling this method performs the following operations:

-   Removes the Element from the DOM.
-   Removes all event listeners, including internal and your custom listeners.
-   Releases iframe resources.
-   Clears internal state.

Below states the difference between this method and [`element.unmount()`](https://docs.antom.com/ac/sdks/web_element-unmount.md):

-   `element.unmount()`: Unmounts but does not destroy the Element instance, it only removes it from the page. You can call [`element.mount()`](https://docs.antom.com/ac/sdks/web_element-mount.md) again to mount.
-   [`element.destroy()`](https://docs.antom.com/ac/sdks/web_element-destroy.md): Completely destroys the Element instance, releases resources, and cannot be mounted again.

> **Notes**:
>
> -   State after destruction: After the Element is destroyed, no methods can be called anymore.
> -   Repeated destruction: Calling `element.destroy()` repeatedly will not cause an error, but the second call will have no effect.

## **Method signature**

When calling this method, please use the following standard method signature format.

#### Tab: JavaScript

```javascript
element.destroy()
```

#### Tab: TypeScript

```typescript
element.destroy(): void
```

## Parameters

This method takes no input parameters.

## Return value

This method does not return any value.