Просмотр исходного кода

Update the liveview renderer to the new sledgehammer version

Evan Almloff 1 год назад
Родитель
Сommit
271b53e866
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      packages/liveview/src/main.js

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

@@ -9,6 +9,7 @@ function main() {
 
 
 class IPC {
 class IPC {
   constructor(root) {
   constructor(root) {
+    window.interpreter = new JSChannel();
     window.interpreter.initialize(root);
     window.interpreter.initialize(root);
     const ws = new WebSocket(WS_ADDR);
     const ws = new WebSocket(WS_ADDR);
     ws.binaryType = "arraybuffer";
     ws.binaryType = "arraybuffer";
@@ -34,7 +35,7 @@ class IPC {
       // The first byte tells the shim if this is a binary of text frame
       // The first byte tells the shim if this is a binary of text frame
       if (binaryFrame) {
       if (binaryFrame) {
         // binary frame
         // binary frame
-        run_from_bytes(messageData);
+        window.interpreter.run_from_bytes(messageData);
       }
       }
       else {
       else {
         // text frame
         // text frame