From 6b92aeb11a2dba95869177fb2b8242af775712e7 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 12 Jun 2024 12:50:15 +0200 Subject: [PATCH] Document constructors --- service2.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/service2.js b/service2.js index 0b4c768..b441026 100644 --- a/service2.js +++ b/service2.js @@ -28,6 +28,11 @@ window.addEventListener('resize', () => * *************************************************************************/ class BesService { + /** + * Constructs class. + * + * @param {Element} hostElement The element in DOM tree we are providing grammar-checking service for + */ constructor(hostElement) { this.hostElement = hostElement this.results = [] // Results of grammar-checking, one per each block/paragraph of text @@ -372,6 +377,11 @@ class BesService { * *************************************************************************/ class BesTreeService extends BesService { + /** + * Constructs class. + * + * @param {Element} hostElement The element in DOM tree we are providing grammar-checking service for + */ constructor(hostElement) { super(hostElement) this.onClick = this.onClick.bind(this) @@ -750,6 +760,11 @@ class BesTreeService extends BesService { * *************************************************************************/ class BesDOMService extends BesTreeService { + /** + * Constructs class. + * + * @param {Element} hostElement The element in DOM tree we are providing grammar-checking service for + */ constructor(hostElement) { super(hostElement) this.onBeforeInput = this.onBeforeInput.bind(this) @@ -825,6 +840,12 @@ class BesDOMService extends BesTreeService { * *************************************************************************/ class BesCKService extends BesTreeService { + /** + * Constructs class. + * + * @param {Element} hostElement The element in DOM tree we are providing grammar-checking service for + * @param {*} ckEditorInstance CKEditor instance + */ constructor(hostElement, ckEditorInstance) { super(hostElement) this.ckEditorInstance = ckEditorInstance @@ -973,6 +994,11 @@ class BesCKService extends BesTreeService { * *************************************************************************/ class BesPlainTextService extends BesService { + /** + * Constructs class. + * + * @param {Element} hostElement The element in DOM tree we are providing grammar-checking service for + */ constructor(hostElement) { super(hostElement) this.reEOP = /(\r?\n){2,}/g