Edit this page

up.RenderResult up.RenderResult.prototype.target
Property

The effective target selector for the rendered fragments.

Matches the actual fragments

Note that this property an exact target the for the fragments that were rendered. This may differ from the initial render options.

For example, if our original render options contained an optional selector with :maybe, and that selector didn't match, it is omitted from the result.target:

let result = await up.render({ target: '#foo, #bar:maybe' })
result.renderOptions // result: "#foo, #bar:maybe"
result.target        // result: "#foo"

If any [up-hungry] elements were added to the render pass, they are included in result.target, although they never explicitly mentioned in our render options:

let result = await up.render({ target: '#foo' })
result.renderOptions // result: "#foo"
result.target        // result: "#foo, #hungry"

Value

target
string