broadcastChannel.ref()


unref() 的相反操作。在先前已 unref() 的 BroadcastChannel 上调用 ref() 并不会让程序在它是唯一活跃句柄时退出(默认行为)。如果端口已经是 ref() 状态,再次调用 ref() 不会有任何效果。

【Opposite of unref(). Calling ref() on a previously unref()ed BroadcastChannel does not let the program exit if it's the only active handle left (the default behavior). If the port is ref()ed, calling ref() again has no effect.】