Skip to content

Plinthos

The Plinthos object is a special global object that gets added to the global scope during the initialization of a Plinthos Kit. It contains variables and functions that are useful for controlling and monitoring the Displays, Stage Instances and Content included in the Snippet.

Important

The global Plinthos object is not available until after the Snippet has initialized which can cause race conditions if there are attempts to access it during page initialization.

Properties

.

attribution

: Attribution[] readonly

attribution

An array of Attribution objects. This array contains all the Attribution objects for all assets across all Stage Instances.

.

activeAttribution

: Attribution[] readonly

activeAttribution

An array of Attribution objects. This array contains only the Attribution objects for currently visible assets across all running Stage Instances.

.

displays

: Object

displays

An object containing a Display Controller for each Display configured in the Snippet. The object keys are the corresponding Instance Keys of the Displays.

.

ready

: boolean

ready

True is the Snippet has finished building all its configured Display and Stage Instances, false if not.

.

version

: boolean

version

The version number of the Plinthos build used by the Kit.

Methods

.

getAncestryDataset

(element: HTMLElement): Object

getAncestryDataset

.

addEventListener

(type: string, listener: EventListener, options?: AddEventListenerOptions): void

addEventListener

Allows the adding of custom event listeners to all Displays in the Kit. All events from all Stage Instance and Displays propagate up through the Plinthos object so adding event listeners that this level is the equivalent of adding the same event listener to each individual Display Controller.

.

removeEventListener

(type: string, listener: EventListener, options?: AddEventListenerOptions): void

removeEventListener

Removes a custom event listener. This works using the same standard rules as regular Javascript event listeners.