summaryrefslogtreecommitdiff
path: root/js/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/main.ts')
-rw-r--r--js/main.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/main.ts b/js/main.ts
index c712f7e08..d035f9ba6 100644
--- a/js/main.ts
+++ b/js/main.ts
@@ -7,6 +7,7 @@ import * as os from "./os";
import * as runtime from "./runtime";
import { libdeno } from "./globals";
import * as timers from "./timers";
+import { onFetchRes } from "./fetch";
function startMsg(cmdId: number): Uint8Array {
const builder = new flatbuffers.Builder();
@@ -24,6 +25,12 @@ function onMessage(ui8: Uint8Array) {
const bb = new flatbuffers.ByteBuffer(ui8);
const base = fbs.Base.getRootAsBase(bb);
switch (base.msgType()) {
+ case fbs.Any.FetchRes: {
+ const msg = new fbs.FetchRes();
+ assert(base.msg(msg) != null);
+ onFetchRes(base, msg);
+ break;
+ }
case fbs.Any.TimerReady: {
const msg = new fbs.TimerReady();
assert(base.msg(msg) != null);