diff --git a/service.js b/service.js index ec36659..a94cf46 100644 --- a/service.js +++ b/service.js @@ -186,6 +186,19 @@ class BesService { return this } + /** + * Schedules proofing after given number of milliseconds. + * + * @param {Number} timeout Number of milliseconds to delay proofing start + */ + scheduleProofing(timeout) { + if (this.timer) clearTimeout(this.timer) + this.timer = setTimeout(() => { + this.proofAll() + delete this.timer + }, timeout) + } + /** * Called initially when grammar-checking run is started */ @@ -521,19 +534,6 @@ class BesTreeService extends BesService { super.unregister() } - /** - * Schedules proofing after given number of milliseconds. - * - * @param {Number} timeout Number of milliseconds to delay proofing start - */ - scheduleProofing(timeout) { - if (this.timer) clearTimeout(this.timer) - this.timer = setTimeout(() => { - this.proofAll() - delete this.timer - }, timeout) - } - /** * Recursively grammar-(re)checks our host DOM tree. */