freifunkmanager/webroot/js/domlib.js

23 lines
360 B
JavaScript
Raw Normal View History

2017-05-16 16:00:32 +02:00
/* exported domlin */
2017-05-16 19:18:35 +02:00
const domlib = {};
(function init () {
'use strict';
domlib.newAt = function newAt (at, eltype) {
const el = document.createElement(eltype);
at.appendChild(el);
return el;
};
domlib.removeChildren = function removeChildren (el) {
if (el) {
while (el.firstChild) {
el.removeChild(el.firstChild);
}
}
};
2017-05-16 16:00:32 +02:00
})();