You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It won't trigger initial onload for elements that are in DOM already:
importonloadfrom"fast-on-load";onload(document.body,()=>console.log('on'),()=>console.log('off'))// silence in console
It triggers unload-only for elements present in both added/removed nodes:
leta=document.createElement(a)onload(a,function(){console.log('on')},function(){console.log('off')})document.body.appendChild(a)document.body.removeChild(a)// logs only 'off'
Just to make sure if that's planned behavior.
The text was updated successfully, but these errors were encountered:
could go either way. If you want to support ssr then you probably need to make this an option. If you want to keep this as an editorialized constraint, keeping it as is buys some simplicity.
sounds like a bug in the general conceptual sense. It should fire both. Are we auto wrapping callbacks in micro tasks?
onload
for elements that are in DOM already:unload
-only for elements present in both added/removed nodes:Just to make sure if that's planned behavior.
The text was updated successfully, but these errors were encountered: