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.
SharedArrayBuffer
Atomics
Required HTTP headers for cross-origin isolation:
Cross-Origin-Opener-Policy: same-originCross-Origin-Embedder-Policy: require-corp Copy
Cross-Origin-Opener-Policy: same-originCross-Origin-Embedder-Policy: require-corp
true if SyncChannel is supported, false otherwise.
true
false
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');} Copy
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');}
Checks if the SyncChannel (synchronous file system operations) is supported. SyncChannel requires
SharedArrayBufferandAtomicswhich are only available in secure contexts with proper COOP/COEP headers.Required HTTP headers for cross-origin isolation: