Class CalloutManager

Index

Methods

Methods

public static closeAll(): boolean

Closes all callouts on the page

Returns

boolean

public static containsOneCalloutOpen(ancestor: HTMLElement): boolean

Gets the first launch point within the specified ancestor element, and returns true if the associated with it callout is opened or opening. If the launch point is not found or the callout is hidden, returns false.

Parameters

  • ancestor: HTMLElement

Returns

boolean

public static createNew(options: CalloutOptions): Callout

Creates a new callout

Parameters

Returns

Callout

public static createNewIfNecessary(options: CalloutOptions): Callout

Checks if callout with specified ID already exists. If it doesn't, creates it, otherwise returns the existing one.

Parameters

Returns

Callout

public static forEach(callback: (callout: Callout) => void): any

Perform some action for each callout on the page.

Parameters

  • callback: (callout: Callout) => void

Returns

any

public static getFromCalloutDescendant(descendant: HTMLElement): Callout

Finds the closest launch point based on the specified descendant element, and returns callout associated with the launch point.

Parameters

  • descendant: HTMLElement

Returns

Callout

public static getFromLaunchPoint(launchPoint: HTMLElement): Callout

Searches for a callout associated with the specified launch point. Throws error if not found.

Parameters

  • launchPoint: HTMLElement

Returns

Callout

public static getFromLaunchPointIfExists(launchPoint: HTMLElement): Callout

Searches for a callout associated with the specified launch point. Returns null if not found.

Parameters

  • launchPoint: HTMLElement

Returns

Callout

public static isAtLeastOneCalloutOn(): boolean

Returns true if at least one of the defined on page callouts is opened or opening.

Returns

boolean

public static isAtLeastOneCalloutOpen(): boolean

Returns true if at least one of the defined on page callouts is opened.

Returns

boolean

public static remove(callout: Callout): any

Detaches callout from the launch point and destroys it.

Parameters

Returns

any