This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This module shall be imported from BrowserWindow's main modules. The node main thread should instead import "workaround-ipc". | |
// NOTE: This gist shall not be used if Electron solves issue https://github.com/electron/electron/issues/37417 | |
import Dexie from "dexie"; | |
import { ipcRenderer } from "electron"; | |
if ("unref" in BroadcastChannel.prototype) { | |
// Node's BroadcastChannel has the `unref()` method. | |
// Seems we got the Node- and not the DOM version of BroadcastChannel. | |
// Only activate this workaround when we have the Node-version of BroadcastChannel |
OlderNewer