Skip to content

Commit

Permalink
(docs) add a note about this and Terminal instance
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Dec 18, 2024
1 parent 1f187eb commit 2e350d9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ characters properly on the terminal you can use [wcwidth](https://github.com/tim
which calculates the width of the characters.

:::note

`wcwidth` library needs to be included before the jQuery Terminal script file.

:::

You can add this code to your HTML:
Expand Down Expand Up @@ -123,6 +125,15 @@ This code will create two commands:
* `hello` which prints on the terminal text `"hello, world!"`,
* `bye` which prints `"goodby"`

:::note

`this` inside methods is jQuery Terminal object, and `echo` is one of the methods supported by this object.

Read more about [terminal instance](/docs/deep-dive/terminal) and [echo](/docs/deep-dive/echo).

:::


To create arguments to the commands you add them as function paramters:

```javascript
Expand Down

0 comments on commit 2e350d9

Please sign in to comment.