OptionalonSubscribe to the init event which fires when the Skeel instance is initialized.
The handler is called regardless of when you subscribe:
This ensures your handler is always invoked with the Skeel instance, eliminating
timing concerns. To prevent memory leaks, it's recommended to access the Skeel
instance via window.Skeel rather than storing the instance passed to the handler
somewhere locally.
The event name.
The handler function to be called when the event fires.
A function to unsubscribe from the event.
Event broker interface for subscribing to Skeel lifecycle events.
This broker enables safe event subscription before the Skeel instance is initialized, which is particularly useful when the Skeel script is loaded asynchronously. Without the broker, you would need to check if
window.Skeelexists before subscribing, potentially missing initialization events.