onFlush: Add callbacks for Shiny session events

Description Usage Arguments Details See Also

View source: R/shiny.R

Description

These functions are for registering callbacks on Shiny session events. onFlush registers a function that will be called before Shiny flushes the reactive system. onFlushed registers a function that will be called after Shiny flushes the reactive system. onSessionEnded registers a function to be called after the client has disconnected.

Usage

1
2
3
4
5

Arguments

fun

A callback function.

once

Should the function be run once, and then cleared, or should it re-run each time the event occurs. (Only for onFlush and onFlushed.)

session

A shiny session object.

Details

These functions should be called within the application's server function.

All of these functions return a function which can be called with no arguments to cancel the registration.

See Also

onStop() for registering callbacks that will be invoked when the application exits, or when a session ends.


tomkuipers1402/shiny documentation built on Feb. 13, 2020, 7:22 p.m.