Thisbehavessimilartothe[BroadcastChannel-API](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API) which is currently only featured in [some browsers](https://caniuse.com/#feat=broadcastchannel).
Whenyouusethismoduleinatest-suite,itisrecommendedtoenforcethefast`simulate` method on all channels so your tests run faster. You can do this with `enforceOptions()`.Ifyousetthis,allchannelshavetheenforcedoptions,nomatherwhatoptionsaregivenintheconstructor.
|**Native**|[ModernBrowsers](https://caniuse.com/broadcastchannel) | If the browser supports the BroadcastChannel-API, this method will be used because it is the fastest |
|**IndexedDB**|[BrowserswithWebWorkers](https://caniuse.com/#feat=indexeddb) | If there is no native BroadcastChannel support, the IndexedDB method is used because it supports messaging between browser-tabs, iframes and WebWorkers |
|**LocalStorage**|[OlderBrowsers](https://caniuse.com/#feat=namevalue-storage) | In older browsers that do not support IndexedDb, a localstorage-method is used |
Handleduplicateleaders.Thiscanhappenonrareoccurenceslikewhenthe[CPUison100%](https://github.com/pubkey/broadcast-channel/issues/385) for longer time, or the browser [has throttled the javascript timers](https://github.com/pubkey/broadcast-channel/issues/414).
-Thisisnotapolyfill.Donotsetthismoduleto`window.BroadcastChannel`.Thisimplementationbehavessimiliartothe[BroadcastChannel-Standard](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API) with these limitations:
-Youcanonlysenddatathatcanbe`JSON.stringify`-ed.
-WhiletheofficalAPIemits[onmessage-events](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessage), this module directly emitts the data which was posted