up.fragment up.fragment.isTargetable(element, [options])
JavaScript function

Returns whether Unpoly can derive a target selector for the given element.


Element

element
required

The element to test.

Type: Element
[options.strong=false]
optional

Whether to provide a more unique selector by only considering the element's [id] and [up-id] 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

[options.verify]
optional

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

Defaults to up.fragment.config.verifyDerivedTarget.

Type: boolean
[options.origin]
optional
Type: Element

Return value

Whether a selector can be derived for the given element.

Type: boolean