From ea9e046d7f118c41c179257447c4ae8014cbb5c3 Mon Sep 17 00:00:00 2001 From: grafixeyehero Date: Thu, 13 Jul 2023 02:41:18 +0300 Subject: [PATCH] clean appFooter self = this --- src/components/appFooter/appFooter.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/components/appFooter/appFooter.js b/src/components/appFooter/appFooter.js index f599a0e0e..38253d221 100644 --- a/src/components/appFooter/appFooter.js +++ b/src/components/appFooter/appFooter.js @@ -11,25 +11,23 @@ function render() { class AppFooter { constructor() { - const self = this; + this.element = render(); - self.element = render(); - self.add = function (elem) { - self.element.appendChild(elem); + this.add = function (elem) { + this.element.appendChild(elem); }; - self.insert = function (elem) { + this.insert = function (elem) { if (typeof elem === 'string') { - self.element.insertAdjacentHTML('afterbegin', elem); + this.element.insertAdjacentHTML('afterbegin', elem); } else { - self.element.insertBefore(elem, self.element.firstChild); + this.element.insertBefore(elem, this.element.firstChild); } }; } - destroy() { - const self = this; - self.element = null; + destroy() { + this.element = null; } }