OnRuntimeInit
OnRuntimeInit is a virtual lifecycle method in the LynxExtensionModule class. It is called by the Lynx framework when the BTS (Background Thread Script) Runtime instance is created and initialized for the associated LynxView.
This callback is always invoked on the UI thread. It signals that the JavaScript execution environment is being set up, but it is not yet ready to execute code. This is an early opportunity to prepare any resources that your module might need to interact with the runtime later.
Method Signature
Usage
Override this method in your LynxExtensionModule subclass to perform pre-setup tasks before the JavaScript runtime is fully active. For example, you might prepare data structures or initialize native modules that will later be exposed to JavaScript.
Example
Lifecycle Sequence
The OnRuntimeInit callback occurs in the following sequence:
OnLynxViewCreate(UI Thread)OnRuntimeInit(UI Thread)OnRuntimeAttach(BTS Thread)OnRuntimeReady(BTS Thread)
See Also
OnRuntimeAttach(): Called on the BTS thread when the runtime is attached.OnRuntimeReady(): Called on the BTS thread when the runtime is ready to execute JavaScript.OnRuntimeDetach(): Called when the runtime is detached.
Compatibility
LCD tables only load in the browser