Home > widget-integration > PredictiveBundleController > renderPredictiveBundleWithData

PredictiveBundleController.renderPredictiveBundleWithData() method

Renders bundle markup into either the modal wrapper or an inline target.

Signature:

renderPredictiveBundleWithData(widgetId: string, bundleData: PredictiveBundleData, wrapper: HTMLElement | null, templateName: string, blockType: string, callback?: () => void): Promise<void>;

Parameters

Parameter

Type

Description

widgetId

string

Widget id being rendered.

bundleData

PredictiveBundleData

Bundle state to render.

wrapper

HTMLElement | null

Optional explicit wrapper element.

templateName

string

Template used for rendering.

blockType

string

Source block type.

callback

() => void

(Optional) Optional callback invoked after markup is inserted.

Returns:

Promise<void>