kernl API
    Preparing search index...

    Interface VisibilityGate

    Visibility gate: defers traffic for hidden windows and drains it on return.

    interface VisibilityGate {
        defer(windowId: string, envelope: GuardEnvelope): boolean;
        drain(windowId: string): readonly GuardEnvelope[];
        forget(windowId: string): void;
        getVisibility(windowId: string): WindowVisibility;
        setVisibility(windowId: string, visibility: WindowVisibility): void;
        shouldDefer(windowId: string, opClass: OpClass): boolean;
    }
    Index
    • Queue an envelope; returns false when the defer queue is full.

      Parameters

      Returns boolean

    • Return every deferred envelope for a window, oldest first, and clear the queue.

      Parameters

      • windowId: string

      Returns readonly GuardEnvelope[]

    • Parameters

      • windowId: string

      Returns void

    • True when envelopes of this class should wait until the window is visible.

      Parameters

      Returns boolean