Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IExtensionLifecycle

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.

Hierarchy

  • IExtensionLifecycle

Index

Properties

Optional activated

activated: function

Function that is invoked when the application has been activated and the user can interact with it

param

The Relativity Review API

Type declaration

Optional apiready

apiready: function

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.

param

The Relativity Review API

Type declaration

Optional canDeactivate

canDeactivate: function

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.

param

The Relativity Review API

returns

A boolean indicating whether or not it is safe to deactivate the application. Any falsy values will be treated as false.

Type declaration

Optional canTeardown

canTeardown: function

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.

param

The Relativity Review API

returns

A boolean indicating whether or not it is safe to tear down the application. Any falsy values will be treated as false.

Type declaration

Optional deactivated

deactivated: function

Function that is invoked when the application has been deactivated and the user can no longer interact with it

param

The Relativity Review API

Type declaration

Optional ready

ready: function

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.

param

The Relativity Review API

Type declaration

Optional teardown

teardown: function

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.

param

The Relativity Review API

Type declaration