Home > widget-integration > RecommendationWidgetController > buildLegacyContext
RecommendationWidgetController.buildLegacyContext() method
Builds a legacy context object for compatibility with product-item helpers.
This method creates a minimal Context object required by legacy helper functions. The helper functions will extract additional settings from DOM attributes and global configuration as needed.
Signature:
protected buildLegacyContext(widgetElement: HTMLElement): Record<string, any>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
widgetElement |
HTMLElement |
The widget DOM element |
Returns:
Record<string, any>
Minimal context object with document and element references