Differences
This shows you the differences between two versions of the page.
— |
jsapi:onlywhenfocused [2025/04/30 03:27] (current) optrix created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====OnlyWhenFocused=== | ||
+ | The **OnlyWhenFocused** function is part of the [[HMITTPanel|HMITTPanel]] class used to connect to live ARDI data. | ||
+ | |||
+ | It sets up event handlers so that the feed of live data stops when a HTML page or SVG file is in the background (ie. not the active tab in your web browser). | ||
+ | |||
+ | This helps avoid congestion and issues when tabs have been closed for an extended period and new data floods in. | ||
+ | |||
+ | ===Parameters=== | ||
+ | |||
+ | None | ||
+ | |||
+ | ===Notes=== | ||
+ | |||
+ | This function is automatically called as part of Connect in newer versions of the library and is mostly present for backwards compatibility. |