Allows injection of css styles into all the shadow root of the widget container This avoids duplicating individual injection into each custom components Used for css styles that are shared across all the nested shadow DOMs ref: https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#constructable_stylesheets
HTMLElement
// Save custom template settings
// This utility is used in widget-utils to merge settings with defaults.
sdk.storeWidgetTemplateSettings(({
features: {
showTitle: true,
preloadImages: true,
disableWidgetIfNotEnabled: true,
addNewTilesAutomatically: true,
handleLoadMore: true,
hideBrokenImages: true,
loadTileContent: true,
loadTimephrase: true,
...settings?.features
},
callbacks: {
...callbackDefaults,
...settings?.callbacks
},
templates: settings?.templates ?? {},
config: settings?.config ?? {}
}
);
Remarks
The Placement SDK provides methods for interacting with the widget's placement, including DOM access, custom styles, templates, and component management. Use this SDK to access placement DOM nodes, inject styles or templates, manage loaded components, and interact with the widget's shadow DOM.