Skip to content

Commit adf72bb

Browse files
neelancebradfitz
authored andcommitted
misc/wasm: add stub for fs.openSync for browsers
This stub is necessary so the time package can fail to load the timezone files in a nice way. It transitively makes the log package work in browsers. Change-Id: I4d360df82989d9b40cd31bb4508a6d057534443e Reviewed-on: https://go-review.googlesource.com/118977 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 30b045d commit adf72bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

misc/wasm/wasm_exec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
}
4242
return buf.length;
4343
},
44+
openSync(path, flags, mode) {
45+
const err = new Error("not implemented");
46+
err.code = "ENOSYS";
47+
throw err;
48+
},
4449
};
4550
}
4651

0 commit comments

Comments
 (0)