2020-07-19 13:49:44 -04:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
|
|
|
|
|
|
|
((window) => {
|
2020-09-16 16:22:43 -04:00
|
|
|
const core = window.Deno.core;
|
2020-07-19 13:49:44 -04:00
|
|
|
|
|
|
|
function consoleSize(rid) {
|
2020-09-16 16:22:43 -04:00
|
|
|
return core.jsonOpSync("op_console_size", { rid });
|
2020-07-19 13:49:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
function isatty(rid) {
|
2020-09-16 16:22:43 -04:00
|
|
|
return core.jsonOpSync("op_isatty", { rid });
|
2020-07-19 13:49:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
function setRaw(rid, mode) {
|
2020-09-16 16:22:43 -04:00
|
|
|
core.jsonOpSync("op_set_raw", { rid, mode });
|
2020-07-19 13:49:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
window.__bootstrap.tty = {
|
|
|
|
consoleSize,
|
|
|
|
isatty,
|
|
|
|
setRaw,
|
|
|
|
};
|
|
|
|
})(this);
|