Edit this page

API class up.RenderResult

Instances of up.RenderResult describe the effects of rendering.

Functions like up.render(), up.follow() or up.submit() return a promise that resolve with an up.RenderResult:

let result = await up.render('.target', content: 'foo')
console.log(result.fragments) // => [<div class="target">...</div>]
console.log(result.layer)     // => up.Layer.Root

Features

All features

JS
up.RenderResult.prototype.fragment stable

Returns the inserted fragment.

JS
up.RenderResult.prototype.fragments stable

An array of fragments that were inserted.

JS
up.RenderResult.prototype.layer stable

The updated layer.

JS
up.RenderResult.prototype.none experimental

Whether this render pass did not result in any fragments being rendered.

JS
up.RenderResult.prototype.target stable

The target selector that was rendered.