Skip to content

Commit b82b357

Browse files
committed
(docs) add note about terminal plugin return value
1 parent 7fdf38f commit b82b357

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/docs/intro.mdx

+10-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Read more about [terminal instance](/docs/deep-dive/terminal) and [echo](/docs/d
136136
To create arguments to the commands you add them as function paramters:
137137

138138
```javascript
139-
$('body').terminal({
139+
const term = $('body').terminal({
140140
hello(what) {
141141
this.echo(`hello, this is ${what}!`);
142142
},
@@ -146,7 +146,15 @@ $('body').terminal({
146146
});
147147
```
148148

149-
If you type `hello Terminal` it will print "hello, this is Terminal"
149+
If you type `hello Terminal` it will print "hello, this is Terminal".
150+
151+
:::info
152+
153+
Note that `terminal` returns Terminal object with methods that allow you to interact with the
154+
terminal. It's the same object you can access with `this`. Terminal object is in fact jQuery object
155+
extended with additional methods.
156+
157+
:::
150158

151159
## Terminal Options
152160

0 commit comments

Comments
 (0)