js-diff-benchmark icon indicating copy to clipboard operation
js-diff-benchmark copied to clipboard

snabbdom is broken on prepend/insert

Open dy opened this issue 4 years ago • 0 comments

  // 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.

dy avatar May 09 '20 18:05 dy