---
name: "up:fragment:destroyed"
area: "API"
kind: "DOM event"
parent: "up.fragment module"
url: "https://unpoly.com/api/up:fragment:destroyed"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.fragment module](https://unpoly.com/api/up.fragment.md)</nav>

# up:fragment:destroyed

This event is [emitted](https://unpoly.com/api/up.emit.md) after a page fragment was [destroyed](https://unpoly.com/api/up.destroy.md) and removed from the DOM.

If the destruction is [animated](https://unpoly.com/api/up.motion.md), this event is emitted _after_ the animation has ended.

The event is emitted on the parent element of the fragment that was removed. If an element with children is destroyed, `up:fragment:destroyed` is only emitted once for the entire subtree that was removed.

<nav aria-label="Guides">

- [Learn: Render lifecycle](https://unpoly.com/learn/render-lifecycle.md)

</nav>

---

## Event properties {#properties}

### event.fragment {#event.fragment}

(required)

The detached element that has been removed from the DOM.

Type: [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)

### event.parent {#event.parent}

(required)

The former parent element of the fragment that has now been detached from the DOM.

Type: [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)

### event.target {#event.target}

(required)

The former parent element of the fragment that has now been detached from the DOM.

Type: [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element)

