MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / prepend

Function prepend

06.Router/basic/js/vue.js:1240–1246  ·  view source on GitHub ↗

* Prepend el to target * * @param {Element} el * @param {Element} target

(el, target)

Source from the content-addressed store, hash-verified

1238 */
1239
1240 function prepend(el, target) {
1241 if (target.firstChild) {
1242 before(el, target.firstChild);
1243 } else {
1244 target.appendChild(el);
1245 }
1246 }
1247
1248 /**
1249 * Replace target with el

Callers 2

FragmentFunction · 0.70
transcludeFunction · 0.70

Calls 1

beforeFunction · 0.70

Tested by

no test coverage detected