diff --git a/src/Console/Console.es6 b/src/Console/Console.es6 index 1cdbd01..66507db 100644 --- a/src/Console/Console.es6 +++ b/src/Console/Console.es6 @@ -17,6 +17,7 @@ export default class Console extends Tool this._appendTpl(); this._initLog(); + this._exposeLog(); this._initConfig(parent); this._bindEvent(parent); } @@ -103,6 +104,12 @@ export default class Console extends Tool $this[isMatch ? 'addClass' : 'rmClass']('eruda-active'); })); } + _exposeLog() + { + let log = this._log; + + CONSOLE_METHOD.forEach(name => this[name] = (...args) => log[name](...args)); + } _bindEvent(parent) { let $input = this._$input,