Home > widget-integration > CustomizationCompatibility
CustomizationCompatibility class
Service for maintaining backward compatibility with legacy customization patterns.
This service enables shops that used legacy customization.afterRender hooks in TAE configuration to continue working without code changes. It executes both general and block-specific afterRender callbacks after widget rendering.
Signature:
export declare class CustomizationCompatibility
Remarks
Supports two levels of customization: 1. General: customization.afterRender(block) - applies to all blocks 2. Block-specific: customization[blockType].afterRender(block) - applies to specific block types
Example
Configure legacy hooks in TAE config:
window.boostSDAppConfig.customization = {
// General hook for all blocks
afterRender: function(block) {
console.log('Block rendered:', block.id);
},
// Block-type specific hooks
recommendation: {
afterRender: function(block) {
// Custom logic for recommendation widgets
jQuery('.boost-pfs-recommendation').customPlugin();
}
}
};
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Executes legacy afterRender customization hooks for a rendered block. Invokes both general and block-type-specific afterRender callbacks if configured. The general hook runs first, followed by the type-specific hook. Both are optional. |