Skip to content

Commit

Permalink
Include all APIs from website
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Aug 19, 2017
1 parent 2f60c24 commit 3ba3638
Show file tree
Hide file tree
Showing 2 changed files with 289 additions and 199 deletions.
24 changes: 13 additions & 11 deletions src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,10 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
};

/**
* Blur the terminal. Delegates blur handling to the terminal's DOM element.
* Blur the terminal, calling the blur function on the terminal's underlying
* textarea.
*/
private blur(): void {
public blur(): void {
return this.textarea.blur();
}

Expand Down Expand Up @@ -1225,9 +1226,9 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT

/**
* Scroll the display of the terminal
* @param {number} disp The number of lines to scroll down (negatives scroll up).
* @param {number} disp The number of lines to scroll down (negative scroll up).
* @param {boolean} suppressScrollEvent Don't emit the scroll event as scrollDisp. This is used
* to avoid unwanted events being handled by the veiwport when the event was triggered from the
* to avoid unwanted events being handled by the viewport when the event was triggered from the
* viewport originally.
*/
public scrollDisp(disp: number, suppressScrollEvent?: boolean): void {
Expand Down Expand Up @@ -1347,12 +1348,13 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
}

/**
* Attaches a custom key event handler which is run before keys are processed, giving consumers of
* xterm.js ultimate control as to what keys should be processed by the terminal and what keys
* should not.
* @param {function} customKeyEventHandler The custom KeyboardEvent handler to attach. This is a
* function that takes a KeyboardEvent, allowing consumers to stop propogation and/or prevent
* the default action. The function returns whether the event should be processed by xterm.js.
* Attaches a custom key event handler which is run before keys are processed,
* giving consumers of xterm.js ultimate control as to what keys should be
* processed by the terminal and what keys should not.
* @param customKeyEventHandler The custom KeyboardEvent handler to attach.
* This is a function that takes a KeyboardEvent, allowing consumers to stop
* propogation and/or prevent the default action. The function returns whether
* the event should be processed by xterm.js.
*/
public attachCustomKeyEventHandler(customKeyEventHandler: CustomKeyEventHandler): void {
this.customKeyEventHandler = customKeyEventHandler;
Expand Down Expand Up @@ -2051,7 +2053,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
}

/**
* Clears the entire buffer, making the prompt line the new first line.
* Clear the entire buffer, making the prompt line the new first line.
*/
public clear(): void {
if (this.buffer.ybase === 0 && this.buffer.y === 0) {
Expand Down
Loading

0 comments on commit 3ba3638

Please sign in to comment.