isSharedWorkerAvailable
function isSharedWorkerAvailable(): boolean;Whether this context can construct a SharedWorker at all.
Notably false in every dedicated worker (they cannot nest a SharedWorker) and in Chrome on Android. Worth checking before choosing this transport, since the constructor throws rather than degrading.
Returns
Section titled “Returns”boolean