Loading static/js/exercises.api.mjs +13 −1 Original line number Diff line number Diff line Loading @@ -132,6 +132,9 @@ class ExerciseExecutionContext { * By default, after running the provided command, "clear" is * executed to clear the terminal. If you do not want to clear the * terminal, set `keepVisible` to true. * * If no command is provided (i.e. command === null), no command is executed. * This is helpful if you just want to clear the terminal at the start of an exercise. * @param {string} command * @param {boolean} keepVisible */ Loading @@ -140,7 +143,9 @@ class ExerciseExecutionContext { function prepareAndResolve() { // Actually prepare and resolve the promise (we get the resolve() function via the closure) if(command !== null) { runCommand(command) } if (!keepVisible) { runCommand("clear") } Loading @@ -163,6 +168,13 @@ class ExerciseExecutionContext { }) } /** * Clear the terminal. Shorthand for prepareWith(null, true) */ clear() { this.prepareWith(null, true) } /** * Indicates that manual confirmation is needed. Used like this: * Loading Loading
static/js/exercises.api.mjs +13 −1 Original line number Diff line number Diff line Loading @@ -132,6 +132,9 @@ class ExerciseExecutionContext { * By default, after running the provided command, "clear" is * executed to clear the terminal. If you do not want to clear the * terminal, set `keepVisible` to true. * * If no command is provided (i.e. command === null), no command is executed. * This is helpful if you just want to clear the terminal at the start of an exercise. * @param {string} command * @param {boolean} keepVisible */ Loading @@ -140,7 +143,9 @@ class ExerciseExecutionContext { function prepareAndResolve() { // Actually prepare and resolve the promise (we get the resolve() function via the closure) if(command !== null) { runCommand(command) } if (!keepVisible) { runCommand("clear") } Loading @@ -163,6 +168,13 @@ class ExerciseExecutionContext { }) } /** * Clear the terminal. Shorthand for prepareWith(null, true) */ clear() { this.prepareWith(null, true) } /** * Indicates that manual confirmation is needed. Used like this: * Loading