detach-channel.ts 396 B

12345678910
  1. import {
  2. detachChannelId,
  3. detachChannel as _detachChannel,
  4. } from '../../../frontend/js/shared/context/detach-context'
  5. // for tests, assert that detachChannel is defined, as BroadcastChannel is available
  6. export const detachChannel = _detachChannel!
  7. // simulate messages from another tab by posting them to this channel
  8. export const testDetachChannel = new BroadcastChannel(detachChannelId)