From 5dbe0dd3de9817fec44edc69993812e6cc0012f0 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 5 Nov 2024 09:24:10 +0100 Subject: [PATCH] Fix scheduleProofing method availability See-also: 04c7f63b5cf62630e74da5949617831b515b6d03 --- service.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) 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. */