1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/components/appFooter/appFooter.js
2021-03-23 11:28:20 -04:00

36 lines
777 B
JavaScript

import './appFooter.scss';
function render() {
const elem = document.createElement('div');
elem.classList.add('appfooter');
document.body.appendChild(elem);
return elem;
}
class appFooter {
constructor() {
const self = this;
self.element = render();
self.add = function (elem) {
self.element.appendChild(elem);
};
self.insert = function (elem) {
if (typeof elem === 'string') {
self.element.insertAdjacentHTML('afterbegin', elem);
} else {
self.element.insertBefore(elem, self.element.firstChild);
}
};
}
destroy() {
const self = this;
self.element = null;
}
}
export default new appFooter();