worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
26
node_modules/dom-helpers/cjs/prepend.js
generated
vendored
Normal file
26
node_modules/dom-helpers/cjs/prepend.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = prepend;
|
||||
|
||||
/**
|
||||
* Insert a given element as the first child of a parent element.
|
||||
*
|
||||
* @param node the element to prepend
|
||||
* @param parent the parent element
|
||||
*/
|
||||
function prepend(node, parent) {
|
||||
if (node && parent) {
|
||||
if (parent.firstElementChild) {
|
||||
parent.insertBefore(node, parent.firstElementChild);
|
||||
} else {
|
||||
parent.appendChild(node);
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
module.exports = exports["default"];
|
||||
Loading…
Add table
Add a link
Reference in a new issue