Home > widget-integration > PredictiveBundleController > getInteractionContext

PredictiveBundleController.getInteractionContext() method

Resolves the widget and wrapper associated with a user interaction.

Signature:

getInteractionContext(target: HTMLElement, wrapper?: HTMLElement | null): {
		widgetId: string;
		wrapper: HTMLElement | null;
	};

Parameters

Parameter

Type

Description

target

HTMLElement

Interaction target.

wrapper

HTMLElement | null

(Optional) Optional wrapper override.

Returns:

{ widgetId: string; wrapper: HTMLElement | null; }

Interaction context containing widget id and wrapper element.