Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function waitForRenderStable

    • Wait for render frames to stabilize

      Useful for visual regression tests that need stable screenshots. Waits for the frame counter to ADVANCE by minFrames if available, otherwise uses a state-based wait + time buffer.

      Best-effort, like waitForNextRender — if the frame counter cannot be read or never advances, the fallback returns after the state wait plus a minFrames * 100ms buffer, which on a starved page can be worth far fewer than minFrames frames. Since the callers are almost all screenshot comparisons, that give-up emits one console.warn naming which branch it took rather than passing off a possibly pre-render capture in silence.

      Parameters

      • page: Page

        Playwright page

      • minFrames: number = 3

        Minimum number of frames to render (used as multiplier for fallback)

      • timeout: number = 10000

        Cap on each INDIVIDUAL wait, not on the call — see the note on raceEvaluate. The frame-counter read, the renderOnce() kick and the frame wait are each capped at Math.min(timeout, 3000); the state-based fallback keeps the full timeout (and still throws, as it always has, if the viewer never settles).

      Returns Promise<void>