eLabSDK2.Journal.Experiment
Hierarchy
-
unknown↳
Experiment
Methods
onExperimentPageReady
Static onExperimentPageReady(callback): void
Register a callback to execute when an experiment page is fully initialized and ready.
This event fires after the experiment application has completed its initialization phase, including loading experiment data and setting up the base infrastructure. Use this for early-stage setup that needs to happen before the experiment UI is fully rendered, such as configuring event handlers, registering extensions, or preparing data structures.
Parameters
| Name | Type | Description |
|---|---|---|
callback | () => void | Function to execute when the experiment page is ready. Note: The callback receives no parameters. |
Returns
void
Example
// Initialize experiment features after page ready
eLabSDK2.Journal.Experiment.onExperimentPageReady(() => {
console.log('Experiment page is ready');
registerExperimentExtensions();
});Example
// Track experiment page loads
eLabSDK2.Journal.Experiment.onExperimentPageReady(() => {
trackAnalytics('experiment_page_ready', {
timestamp: Date.now()
});
});© 2023 eLabNext
Updated about 15 hours ago