How can I change an element tag without losing handlers?
Change? It's basically impossible to change it.
You can only delete an element and create a new one in its place. Naturally, all handlers will be lost.
The answer is no.
To be honest, just curious, but what is it for? In all my practice, there has never been such a need))Sebastien Navarro
To place the code, please use CodePen or similar tool. Thanks you!