---
name: "up.fragment.isTargetable"
area: "API"
kind: "JavaScript function"
parent: "up.fragment module"
url: "https://unpoly.com/api/up.fragment.isTargetable"
---
<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.isTargetable(element, [options])

Returns whether Unpoly can [derive a target selector](https://unpoly.com/learn/target-derivation.md) for the given element.

---

## Parameters {#parameters}

### Element {#parameters-element}

#### element {#element}

(required)

The element to test.

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

#### [options.strong=false] (Experimental) {#options.strong}

(optional)

Whether to provide a more unique selector by only considering the element's `[id]` and [`[up-id]`](https://unpoly.com/api/up-id.md) attributes.

Weaker target derivers, like the element's class, are not considered in strong mode. The element's tag name is only considered for singleton elements like `<html>` or `<body>`.

Type: boolean

### Verification {#parameters-verification}

#### [options.verify] {#options.verify}

(optional)

Whether to verify that the derived selector matches the given element.

Defaults to [`up.fragment.config.verifyDerivedTarget`](https://unpoly.com/api/up.fragment.config.md#config.verifyDerivedTarget).

Type: boolean

#### [options.origin] {#options.origin}

(optional)

The origin used to [resolve an ambiguous selector](https://unpoly.com/learn/targeting-fragments.md#ambiguous-selectors) during [target verification](https://unpoly.com/learn/target-derivation.md#verification).

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

---

## Return value {#return-value}

Whether a selector can be derived for the given element.

Type: boolean

