UNPKG
@kickscondor/umbrellajs
Version:
latest (3.1.2)
3.1.2
3.1.1
Lightweight and intuitive javascript library
umbrellajs.com
kickscondor/umbrella
@kickscondor/umbrellajs
/
src
/
plugins
/
prepend
/
prepend.js
7 lines
(6 loc)
•
211 B
JavaScript
View Raw
1
2
3
4
5
6
7
// Add nodes at the beginning of each node
u.
prototype
.
prepend
=
function
(
html, data
) {
return
this
.
adjacent
(html, data,
function
(
node, fragment
) { node.
insertBefore
(fragment, node.
firstChild
); }); };