Internal

The internal object is a collection of functions generally useful to the operation of pages within Relativity for checking on the system's state and interacting with the system as a whole.

Copy
relativity.internal

Note: Anything on relativity.internal not listed in the supported surface area below should not be used, and should be considered volatile (subject to change or removal without warning).

Supported Surface Area of relativity.internal

getApi

Retrieves the API object for the given participant.

Copy
getApi(participantName: string) : object
  • participantName - the name of the participant from which the API will be retrieved
  • Returns object: the API object of the specified participant if it exists, empty object otherwise

Example:

Copy
const formsApi = relativity.internal.getApi("Forms");
// formsApi now has the Forms API object stored

getClickTrackingElements

Retrieves markup element(s) for enabling click tracking. This is provided for consumers who want to add click tracking within their own custom pages.

Copy
getClickTrackingElements() : Promise<HTMLElement[]>
  • Returns promise: resolves to an array with the markup element(s) used to setup click tracking your custom page.

Example:

Copy
const elements = relativity.internal.getClickTrackingElements();
document.head.append(...elements);
// document.head now has the markup elements attached

isActive

Returns the active status of the specified participant.

Copy
isActive(participantName: string) : boolean
  • participantName - the name of the participant to check active status
  • Returns boolean: whether or not the specified participant is the active frame

Example:

Copy
const isActive = relativity.internal.isActive("Forms");
// isActive = true if Forms is the active iframe, false otherwise

isReady

Returns the ready status of the specified participant.

Copy
isReady(participantName: string) : boolean
  • participantName - the name of the participant to check ready status
  • Returns boolean: whether or not the specified participant has signalled ready

Example:

Copy
const isReady = relativity.internal.isReady("Forms");
// isReady = true if Forms has signalled ready, false otherwise

maximizeContent

Maximizes the specified participant's iframe to fill the entire screen.

Copy
maximizeContent(participantName?: string) : RelativeIframePositionMetadata
  • participantName - the name of the participant whose iframe will be maximized. If undefined, it will maximize the external page.
  • Returns RelativeIframePositionMetaData | undefined: undefined if the frame was not maximized. RelativityIframePositionMetadata contains positioning information about the iframe. Its shape consists of these properties measured in pixels:
    Copy
    {
        left,
        top,
        bottom,
        right,
        width,
        height,
    }

Example:

Copy
relativity.internal.maximizeContent("Forms");
// Forms iframe is now maximized

openSupport

Opens the Relativity Support page in a new window/tab.

Copy
openSupport() : void

Example:

Copy
relativity.internal.openSupport();
// Support page has opened in a new window/tab

resetSessionExpirationTimeout

Resets the session expiration timeout to prolong the Relativity session duration before automatic logout.

Copy
resetSessionExpirationTimeout() : void

Example:

Copy
relativity.internal.resetSessionExpirationTimeout();
// Relativity session has been extended

restoreContent

Restores the specified participant's iframe to its normal size so it no longer fills the screen.

Copy
restoreContent() : void

Example:

Copy
relativity.internal.restoreContent("Forms");
// Forms iframe is no longer full screen

sessionActivityEvents

Gets the list of activity events that can be used to push back session expiration.

Copy
sessionActivityEvents() : Array<string>
  • Returns array: a collection of strings representing the session activity events

Example:

Copy
relativity.internal.sessionActivityEvents;
// returns an array of the session activity events (i.e. ['click', 'mousemove', 'mouseenter', 'mousewheel', 'keyup', 'scroll', 'touchmove', 'touchstart'])

toggleTabStrip

Toggles the display of the tabstrip (i.e. sidebar).

Copy
toggleTabStrip(toggleOn: boolean) : void
  • toggleOn - represents whether the tabstrip (i.e. sidebar) should be shown

Example:

Copy
relativity.internal.toggleTabStrip(false);
// hides the tabstrip

Deprecated or Internally-used items

As with any other property on the relativity.internal object not specified in the section above, the following are not supported for public consumption. These items may have been supported in the past, but are now deprecated or only for use internally. They may be changed or removed at any time.

Copy
isEnabled(participantName: string) : Boolean

isWindow(participantName: string) : Boolean

showAbout() : void

waitUntilNavHeaderReady() : Promise

whenReady(participantName: string) : Promise

whenStarting(participantName: string) : Promise

WINDOW_IS_RELATIVITY_INTERNAL : Boolean