This swap function is just `a.replaceWith(c, d, e, …)` in DOM4
https://htmldom.dev/swap-two-nodes
If you haven't seen this before, I highly suggest looking into it.
https://github.com/WebReflection/dom4 (I can't find any articles about DOM 4, so this polyfill’s readme will have to do)
This swap function is just `a.replaceWith(c, d, e, …)` in DOM4
https://htmldom.dev/swap-two-nodes
If you haven't seen this before, I highly suggest looking into it.
https://github.com/WebReflection/dom4 (I can't find any articles about DOM 4, so this polyfill’s readme will have to do)