Closed patrick-steele-idem closed 7 years ago
Thanks @patrick-steele-idem!
That's exciting news @patrick-steele-idem!
FYI, I tried out upgrading morphdom in yo-yo locally and it appears to have broken the following tests:
@timwis thanks for taking a look. The breaking test looks to be due to the following breaking change in morphdom
:
onBeforeMorphEl
(use onBeforeElUpdated
instead)onBeforeMorphElChildren
(use onBeforeElChildrenUpdated
instead)Fortunately, it should be a simple change to the following line:
https://github.com/maxogden/yo-yo/blob/656992c1553782c779c9de4c711614b16c7f342a/index.js#L11
Something like the following should work:
if (opts.onBeforeMorphEl) { // If you need to support the old `onBeforeMorphEl`
opts.onBeforeElUpdated = opts.onBeforeMorphEl
}
if (!opts.onBeforeElUpdated) opts.onBeforeElUpdated = copier
We should close this issue now that #51 has landed 😸
Thanks @kristoferjoseph!
FYI, I just published
morphdom@2
with some improvements:onNodeAdded
is now called for all on child nodes and not just the root node (closes PR #57)morphdom
based on benchmarksBreaking changes
onNodeAdded
is now called for all on child nodes (not just the root node)onBeforeMorphEl
(useonBeforeElUpdated
instead)onBeforeMorphElChildren
(useonBeforeElChildrenUpdated
instead)See: morphdom/CHANGELOG
When you have a chance to upgrade please let me know if you see any issues.
Cheers.