happy-opfs
    Preparing search index...

    Function isSyncChannelSupported

    • Checks if the SyncChannel (synchronous file system operations) is supported. SyncChannel requires SharedArrayBuffer and Atomics which are only available in secure contexts with proper COOP/COEP headers.

      Required HTTP headers for cross-origin isolation:

      Cross-Origin-Opener-Policy: same-origin
      Cross-Origin-Embedder-Policy: require-corp

      Returns boolean

      true if SyncChannel is supported, false otherwise.

      2.0.0

      isOPFSSupported for checking OPFS support

      if (isSyncChannelSupported()) {
      // Use sync APIs
      const result = await SyncChannel.connect(worker);
      const content = readFileSync('/path/to/file');
      } else {
      console.warn('SyncChannel requires cross-origin isolation');
      }