Skip to content

Add a way to tell terminal that interpreter use animation #683

@jcubic

Description

@jcubic

I have an idea for a new feature for jQuery Terminal

Some commands may use different forms of animation example echo stuff and use delay in between lines.
It would be nice to have API method that can be called to indicate that the interpreter is doing animation, even if it returns a promise.

Possible name Terminal::animate()

Example usage:

$('body').function({
  hello: async function(...args) {
    this.animate();
    for (let arg of args) {
        this.echo(arg);
        await delay(100);
    }
  }
});

Right now async will pause the terminal and wait for the result. It can be a different name instead of animate() since it was reported that someone wanted to use async code to do something and he needed to wrap in an anonymous async function.

TODO:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions