Home > widget-integration > InstantSearchModule > onInitBlock
InstantSearchModule.onInitBlock() method
Called when an instant search block is registered.
Resolves services, exports the module to window, and defers or immediately initializes the controller depending on device type.
On mobile/tablet (< 991 px) the ISW initializes immediately because users interact with the search input right away. On desktop, initialization is deferred until the first mousemove or touchmove event for performance.
Signature:
protected onInitBlock(block: AppBlock): Promise<void>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
block |
The AppBlock instance being initialized |
Returns:
Promise<void>