Closed timwis closed 8 years ago
Oh interesting. It looks like morphdom doesn't add/remove that node so the mutation observer never fires. It only changes the attribute in the DOM.
I can fix that by also observing the data-onloadid
attribute and when one changes into another, fire the onunload
and onload
for each respectively.
@timwis Ok give 2.2.0
a go. It now watches data-onloadid
attribute changes in case the node doesn't change but the attribute did. It has some perf improvements too.
woohoo! Looks like the above test case is working as expected now. Thanks for the quick resolution, @shama!
Per yoshuawuyts/choo#1:
@yoshuawuyts suggested it may be because of this not being cleaned up. Any advice?