diff options
author | Colin Ihrig <cjihrig@gmail.com> | 2022-04-20 15:48:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-20 15:48:15 -0400 |
commit | 2a93c134dc93d70b5f6ea9d417c88207661884d5 (patch) | |
tree | 09fecb2f1c44da117309e2ad436ffa56860c9b6e /cli/tools/repl/session.rs | |
parent | f785ecee1a68faac517a6d35763dd26ef033d722 (diff) |
feat(repl): add global clear() function (#14332)
This commit adds a clear() function in the REPL which works
similar to console.clear().
Diffstat (limited to 'cli/tools/repl/session.rs')
-rw-r--r-- | cli/tools/repl/session.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/tools/repl/session.rs b/cli/tools/repl/session.rs index 57109eb1d..d72fc9499 100644 --- a/cli/tools/repl/session.rs +++ b/cli/tools/repl/session.rs @@ -41,6 +41,8 @@ Object.defineProperty(globalThis, "_error", { console.log("Last thrown error is no longer saved to _error."); }, }); + +globalThis.clear = console.clear.bind(console); "#; pub enum EvaluationOutput { |