Browse Source

chore: use ws instead of global

Jonathan Kelley 2 năm trước cách đây
mục cha
commit
3c1786b7f1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packages/liveview/src/main.js

+ 1 - 1
packages/liveview/src/main.js

@@ -13,7 +13,7 @@ class IPC {
     let ws = new WebSocket(WS_ADDR);
 
     ws.onopen = () => {
-      window.ipc.postMessage(serializeIpcMessage("initialize"));
+      ws.send(serializeIpcMessage("initialize"));
     };
 
     ws.onerror = (err) => {