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
{{ message }}
Repository navigation
Neither connectedCallback nor disconnectedCallback should be called when re-mapping causes a shuffle. #254
Conceptually, if you render [foo, bar] and then re-render [bar, foo], neither of those elements should be disconnected at all. However, because low-level DOM apis will cause a disconnect followed by a connect — there’s no great way to perform this shuffle without causing at least one disconnection.
It’s officially in the specification (and has been on my Christmas list all year)… it appears to be supported by Chrome and Firefox (but not yet Safari).
I can open up a PR and we can watch it… I suppose.
Activity
theengineear commentedon Feb 18, 2025
Note — we should look into adding a stub for
connectedMoveCallbackin theXElementbase class once this all lands.theengineear commentedon Oct 15, 2025
Firefox now supports
moveBeforeas well — https://www.firefox.com/en-US/firefox/144.0/releasenotes/klebba commentedon Dec 6, 2025
@theengineear I noticed
x-element/x-template.js
Lines 428 to 479 in c332566
theengineear commentedon Dec 6, 2025
It’s officially in the specification (and has been on my Christmas list all year)… it appears to be supported by Chrome and Firefox (but not yet Safari).
I can open up a PR and we can watch it… I suppose.
👏 but 👏 we’re 👏 so 👏 close 👏
theengineear commentedon Dec 6, 2025
It does pass in FF Nightly now (but not latest, yet).
Use “moveBefore” for map shuffling.
Use “moveBefore” for map shuffling.
Use “moveBefore” for map shuffling.
Use “moveBefore” for map shuffling.
theengineear commentedon Dec 8, 2025
@klebba — feel free to also pile on to that Safari bug ticket if you want :^)
Seems like there has not been much action on that thread in a while.
theengineear commentedon Apr 15, 2026
Looks like there is a person assigned to that bug ticket now and things are being updated 🤞