Register dashboard modules for lazy loading via IntersectionObserver.
When a container element intersects the viewport (with a 200 px pre-fetch margin), its loader is called, the skeleton class is added, and removed once the promise resolves or rejects.
If IntersectionObserver is unavailable (old browser), all loaders are invoked immediately as a graceful fallback (containers still checked for DOM presence before loading).
The created IntersectionObserver is returned so callers can hold a reference (preventing GC) and call disconnect() if needed. undefined is returned when the fallback path is taken.
Register dashboard modules for lazy loading via IntersectionObserver.
When a container element intersects the viewport (with a 200 px pre-fetch margin), its loader is called, the skeleton class is added, and removed once the promise resolves or rejects.
If
IntersectionObserveris unavailable (old browser), all loaders are invoked immediately as a graceful fallback (containers still checked for DOM presence before loading).The created
IntersectionObserveris returned so callers can hold a reference (preventing GC) and calldisconnect()if needed.undefinedis returned when the fallback path is taken.