Edit this page

API class up.RenderJob

A queued render task.

Rendering functions like up.render() or up.submit() return an up.RenderJob. Callers can inspect the job's options or await its completion.

See render hooks for examples for awaiting rendering completion and how to handle errors.

Example

let job = up.render('.foo', url: '/users')
console.log(job.options.target) // logs ".foo"
console.log(job.options.url) // logs "/users"
let renderResult = await job // fragments were updated
console.log(renderResult.fragment) // logs the updated fragment
let finalResult = await job.finished // animations are done and cached content was revlidated
console.log(finalResult.fragment) // logs the revalidated fragment

Features

All features

JS
up.RenderJob.prototype.finished stable

A promise that fulfills when fragments were updated, animations have concluded and cached content was revalidated.

JS
up.RenderJob.prototype.options stable

The render options for this job.

JS
up.RenderJob.prototype.then(onFulfilled, onRejected) stable

An up.RenderJob is also a promise for its completion.