添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

The crossOriginIsolated read-only property of the WindowOrWorkerGlobalScope interface returns a boolean value that indicates whether a SharedArrayBuffer can be sent via a Window.postMessage() call.

This value is dependant on any Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers present in the response.

Syntax

var myCrossOriginIsolated = self.crossOriginIsolated; // or just crossOriginIsolated

Value

A boolean value

Examples

if(crossOriginIsolated) {
  // Post SharedArrayBuffer
} else {
  // Do something else

Specifications

HTML Living Standard
The definition of 'crossOriginIsolated' in that specification.
Living Standard Initial definition.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
crossOriginIsolated
ExperimentalNon-standard
Chrome No support NoEdge No support NoFirefox Full support 72IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.

See also

  • Service Workers
  • Web Workers
  • © 2005-2020 Mozilla and individual contributors. Content is available under CC BY-SA-2.5.
    Backup generated August, 2020 by RealityRipple Software.

    Report a Broken Link
  • Terms
  • Privacy
  • Cookies
  •