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

# up.Request.prototype.fragment

Returns the fragment matched by this request's [target selector](https://unpoly.com/api/up.Request.prototype.target.md).

When [multiple fragments](https://unpoly.com/learn/targeting-fragments.md#multiple) are targeted, the first fragment is returned. To get a list of all targeted fragments, use the [`{ fragments }`](https://unpoly.com/api/up.Request.prototype.fragments.md) property.

When this request will [open a new overlay](https://unpoly.com/learn/opening-overlays.md), `undefined` is returned.

See also [`up.RenderResult#fragment`](https://unpoly.com/api/up.RenderResult.prototype.fragment.md).

---

## Value {#value}

### fragment {#fragment}

The first targeted fragment.

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

