Uncaught ReferenceError: BroadcastChannel is not defined
Uncaught ReferenceError: BroadcastChannel is not defined
尝试在本地 运行 deno 支持 broadcast channel 的 deno 部署应用程序,但出现此编译错误我该如何解决?
const channel = new BroadcastChannel('')
Uncaught ReferenceError: BroadcastChannel is not defined
它在 v1.17.1
的稳定文档中,所以不需要 --unstable
来使用它:
https://doc.deno.land/deno/stable@v1.17.1/~/BroadcastChannel
Compare with unstable: https://doc.deno.land/deno/unstable@v1.17.1
然而,实际上并非如此:
$ deno
Deno 1.17.1
exit using ctrl+d or close()
> new BroadcastChannel()
Uncaught ReferenceError: BroadcastChannel is not defined
at <anonymous>:2:1
> close()
$ deno --unstable
Deno 1.17.1
exit using ctrl+d or close()
> new BroadcastChannel()
Uncaught TypeError: Failed to construct 'BroadcastChannel': 1 argument required, but only 0 present.
at Object.requiredArguments (deno:ext/webidl/00_webidl.js:627:13)
at new BroadcastChannel (deno:ext/broadcast_channel/01_broadcast_channel.js:81:14)
at <anonymous>:2:1
> close()
您可以在 the repo 中提交问题。
编辑:问题创建:denoland/deno#13214
尝试在本地 运行 deno 支持 broadcast channel 的 deno 部署应用程序,但出现此编译错误我该如何解决?
const channel = new BroadcastChannel('')
Uncaught ReferenceError: BroadcastChannel is not defined
它在 v1.17.1
的稳定文档中,所以不需要 --unstable
来使用它:
https://doc.deno.land/deno/stable@v1.17.1/~/BroadcastChannel
Compare with unstable: https://doc.deno.land/deno/unstable@v1.17.1
然而,实际上并非如此:
$ deno
Deno 1.17.1
exit using ctrl+d or close()
> new BroadcastChannel()
Uncaught ReferenceError: BroadcastChannel is not defined
at <anonymous>:2:1
> close()
$ deno --unstable
Deno 1.17.1
exit using ctrl+d or close()
> new BroadcastChannel()
Uncaught TypeError: Failed to construct 'BroadcastChannel': 1 argument required, but only 0 present.
at Object.requiredArguments (deno:ext/webidl/00_webidl.js:627:13)
at new BroadcastChannel (deno:ext/broadcast_channel/01_broadcast_channel.js:81:14)
at <anonymous>:2:1
> close()
您可以在 the repo 中提交问题。
编辑:问题创建:denoland/deno#13214