ChemPal Documentation - v1.12.0
    Preparing search index...
    • Force any buffered increments to IndexedDB immediately, bypassing the debounce timer. Call this at points where the buffer would otherwise be at risk of never flushing — e.g. once a search finishes, since the popup can be closed (and its JS context destroyed) at any moment afterward.

      Returns Promise<void>

      export async function flushPendingStats(): Promise<void> {
      if (flushTimer !== null) {
      clearTimeout(flushTimer);
      flushTimer = null;
      }
      await flushToStorage();
      }