Skip to main content

Class: DomHelper

Constructors​

new DomHelper()​

new DomHelper(): DomHelper

Returns​

DomHelper

Methods​

addLoadingElements()​

static addLoadingElements(): void

Add elements to hide the canvas and show a spinner.

Returns​

void

Defined in​

m2c2kit/packages/session/src/DomHelper.ts:39


addStyleSheet()​

static addStyleSheet(css): void

Adds a style sheet to the head of the document.

Parameters​

• css: string

text of the CSS

Returns​

void

Defined in​

m2c2kit/packages/session/src/DomHelper.ts:30


configureDomForActivity()​

static configureDomForActivity(activity): void

Depending on the type of activity, set the visibility of the survey div and canvas div.

Parameters​

• activity: Activity

the activity to configure the DOM for

Returns​

void

Defined in​

m2c2kit/packages/session/src/DomHelper.ts:66


createRoot()​

static createRoot(rootElement): void

Specifies the HTML element in which to render the m2c2kit activities.

Parameters​

• rootElement: HTMLElement

the element to add the survey div and canvas div to

Returns​

void

Defined in​

m2c2kit/packages/session/src/DomHelper.ts:9


hideM2c2Elements()​

static hideM2c2Elements(): void

Hide the canvas div and survey div.

Returns​

void

Defined in​

m2c2kit/packages/session/src/DomHelper.ts:82


setBusyAnimationVisibility()​

static setBusyAnimationVisibility(visible): void

Shows or hides the busy animation.

Parameters​

• visible: boolean

true if the busy animation should be visible

Returns​

void

Defined in​

m2c2kit/packages/session/src/DomHelper.ts:108


setCanvasOverlayVisibility()​

static setCanvasOverlayVisibility(visible): void

Shows or hides the canvas overlay.

Parameters​

• visible: boolean

true if the canvas overlay should be visible

Returns​

void

Defined in​

m2c2kit/packages/session/src/DomHelper.ts:92