@@ -357,6 +357,19 @@ Terminal.prototype.focus = function() {
|
||||
return this.textarea.focus();
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets an option on the terminal.
|
||||
* @param {string} key The option key.
|
||||
* @param {string} value The option value.
|
||||
*/
|
||||
Terminal.prototype.setOption = function(key, value) {
|
||||
if (!(key in Terminal.defaults)) {
|
||||
throw new Error('No option with key "' + key + '"');
|
||||
}
|
||||
this[key] = value;
|
||||
this.options[key] = value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Binds the desired focus behavior on a given terminal object.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user