-
Script loads →
smile-js-loadedevent fires.-
The
Smileobject becomes available in the global scope. - SDK methods exist but are not yet ready to use.
-
It is now possible to call
Smile.initialize().
-
The
-
Initialization →
Smile.initialize()is called.- The SDK authenticates with the Smile API.
- Any preloaded resources are fetched and cached.
- A customer session is established (if customer token provided).
-
Initialization complete →
smile-js-initializedevent fires.- SDK is fully ready to use.
- All methods can be called safely.
- Preloaded data is available.
Lifecycle events
Lifecycle events
Learn about the events the JavaScript SDK dispatches during its setup, from script load to initialization.
The SDK dispatches lifecycle events at key moments during its setup and operation. The flow of events follows this sequence: