Edit this page

up.fragment up:fragment:offline
DOM event

This feature is experimental. It may be changed or removed in a future version.

This event is emitted when the device loses its network connection while rendering content.

Listeners may decide how to handle the connection loss. E.g. you may choose to display an error, or to offer a button that retries the failed request. See handling connection loss for more details and examples.

The event is emitted on the targeted layer.

Event properties

event.request up.Request

The original request to the server.

event.renderOptions Object

Options for the up.render() call that has caused the failed request.

event.retry() Function(Object): Promise<up.RenderResult>

Retry the render pass with the same options.

You may pass an object to override individual properties from the original render options.

Retrying causes a second render pass with its own async up.RenderResult. The promise from the original render pass has already been rejected when up:fragment:offline is emitted.

[event.origin] Element optional

The link or form element that caused the fragment update.