Skip to content

Commit bc10fbd

Browse files
authored
Merge pull request #351 from yuvipanda/docsome
Add doc comments for *some* events
2 parents 38cd1bd + 6dcf726 commit bc10fbd

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/xterm.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,11 @@ Terminal.prototype.open = function(parent) {
630630
Terminal.brokenBold = isBoldBroken(this.document);
631631
}
632632

633+
/**
634+
* This event is emitted when terminal has completed opening.
635+
*
636+
* @event open
637+
*/
633638
this.emit('open');
634639
};
635640

@@ -1285,6 +1290,12 @@ Terminal.prototype.scroll = function() {
12851290
this.updateRange(this.scrollTop);
12861291
this.updateRange(this.scrollBottom);
12871292

1293+
/**
1294+
* This event is emitted whenever the terminal is scrolled.
1295+
* The one parameter passed is the new y display position.
1296+
*
1297+
* @event scroll
1298+
*/
12881299
this.emit('scroll', this.ydisp);
12891300
};
12901301

@@ -3144,6 +3155,12 @@ Terminal.prototype.handler = function(data) {
31443155
* @param {string} title The title to populate in the event.
31453156
*/
31463157
Terminal.prototype.handleTitle = function(title) {
3158+
/**
3159+
* This event is emitted when the title of the terminal is changed
3160+
* from inside the terminal. The parameter is the new title.
3161+
*
3162+
* @event title
3163+
*/
31473164
this.emit('title', title);
31483165
};
31493166

0 commit comments

Comments
 (0)