PdataStore
Bun

property

WebView.ConstructorOptions.dataStore

dataStore?: 'ephemeral' | { directory: string }

Storage backing for cookies, localStorage, IndexedDB, etc.

  • "ephemeral" (default): in-memory only, nothing written to disk.
  • { directory }: persistent storage rooted at the given path. Multiple views with the same directory share state.

Chrome backend: directory is per-Chrome-process (--user-data-dir), not per-view. The first view's directory applies to all views spawned in the same Bun process.