Function that is invoked when the application has been activated and the user can interact with it
Function that is invoked when the application has begun bootstrapping and the public IReviewInterfaceApi is ready for use
Extensions should ensure that this function is fast so that it does not impact application startup speeds. NOTE: Certain portions of the application, such as the active {@link IViewerInstance} might not have been created yet, and therefore APIs available on that viewer instance might not yet be available.
Function that is invoked just prior to application deactivation to determine if it is safe to deactivate the application
The return value from this method is used to determine if application deactivation is safe. If it is unsafe to deactivate the application, this function should return false. If it is safe to deactivate the application, this function should return true. All falsy values will be treated as false. If any event handlers deny application deactivation, the user will be given the option to cancel application deactivation or continue. Extensions should ensure that this function is fast so that it does not impact navigation speeds.
Function that is invoked just prior to the application being torn down to determine if it is safe to tear down the application
The return value from this method is used to determine if application teardown is safe. If it is unsafe to tear down the application and remove it from memory, this function should return false. If it is safe to tear down the application, this function should return true. All falsy values will be treated as false. If any event handlers deny application teardown, the user will be given the option to cancel teardown or continue. Due to browser restrictions, this function must be synchronous and must not perform any asynchronous HTTP calls. Synchronous HTTP calls are supported, but attempting an asynchronous one will cause the browser to cancel the action. Additionally, some browsers will ignore attempts to prompt the user if there have been no user interactions on the page since the page was loaded. Browser specifications are constantly changing and it is possible that a web browser update may break this functionality in the future. Extensions should ensure that this function is fast so that it does not impact navigation speeds. NOTE: This function is only invoked if the application is currently activated.
Function that is invoked when the application has been deactivated and the user can no longer interact with it
Function that is invoked when application startup is complete and a document has been presented to the user
NOTE: If a document navigation is requested before the initial document can be shown to the user, this function will be invoked at that time- before the initial document is displayed.
Function that is invoked when application teardown has been approved and the application is about to be unloaded from memory
This is the last opportunity to run code before the application is removed from memory. Due to browser restrictions, this function must be synchronous and must not perform any asynchronous HTTP calls. Synchronous HTTP calls are supported, but attempting an asynchronous one will cause the browser to cancel the action. Browser specifications are constantly changing and it is possible that a web browser update may break this functionality in the future. Extensions should ensure that this function is fast so that it does not impact navigation speeds.
Application-level lifecycle events that an extension can subscribe to
An extension's custom code can be executed when any of these lifecylce events are fired. Additionally, extensions can subscribe to other events inside of a handler for one of these lifecycle events.