js-diff-benchmark
js-diff-benchmark copied to clipboard
snabbdom is broken on prepend/insert
// insert
diff(parent,[], [e1,e3,e5], null);
diff(parent,[...parent.childNodes],[e1,e2,e3,e4,e5], null);
parent.childNodes // e1, e2, e3, e5, e4
// prepend
diff(parent,[], [e4,e5], null);
diff(parent,[e4,e5],[e1,e2,e3,e4,e5], null);
parent.childNodes // e4, e5, e1, e2, e3
That is so regardless of the last argument.