refactor(core): convert core.print() to a builtin op (#10436)

This commit is contained in:
Aaron O'Mullan 2021-05-03 01:30:03 +02:00 committed by GitHub
parent c9ac851b90
commit ea917384fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 46 deletions

View file

@ -124,6 +124,10 @@
opSync("op_close", rid);
}
function print(str, isErr = false) {
opSync("op_print", [str, isErr]);
}
// Provide bootstrap namespace
window.__bootstrap = {};
// Extra Deno.core.* exports
@ -132,6 +136,7 @@
opSync,
ops,
close,
print,
resources,
registerErrorClass,
handleAsyncMsgFromRust,