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

37 lines
789 B
JavaScript
Raw Normal View History

import 'css!./appFooter';
2018-10-23 01:05:09 +03:00
function render(options) {
const elem = document.createElement('div');
elem.classList.add('appfooter');
document.body.appendChild(elem);
return elem;
}
2018-10-23 01:05:09 +03:00
class appFooter {
constructor(options) {
const self = this;
self.element = render(options);
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);
}
};
2018-10-23 01:05:09 +03:00
}
destroy() {
var self = this;
self.element = null;
}
}
2020-07-24 17:18:28 +02:00
export default appFooter;