mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
clean appFooter self = this
This commit is contained in:
parent
c6e297e011
commit
ea9e046d7f
1 changed files with 8 additions and 10 deletions
|
@ -11,25 +11,23 @@ function render() {
|
||||||
|
|
||||||
class AppFooter {
|
class AppFooter {
|
||||||
constructor() {
|
constructor() {
|
||||||
const self = this;
|
this.element = render();
|
||||||
|
|
||||||
self.element = render();
|
this.add = function (elem) {
|
||||||
self.add = function (elem) {
|
this.element.appendChild(elem);
|
||||||
self.element.appendChild(elem);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.insert = function (elem) {
|
this.insert = function (elem) {
|
||||||
if (typeof elem === 'string') {
|
if (typeof elem === 'string') {
|
||||||
self.element.insertAdjacentHTML('afterbegin', elem);
|
this.element.insertAdjacentHTML('afterbegin', elem);
|
||||||
} else {
|
} 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue