Is it possible to remove all attributes at once using jQuery?
to
One-liner, no jQuery needed:
[...elem.attributes].forEach(attr => elem.removeAttribute(attr.name));