When using Idiomorph with Alpine.js, morphing fails when server-returned content contains Alpine's shorthand attribute syntax (e.g., @change) on non-input elements (like div, span, etc.).
Error:
InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': '@change' is not a valid attribute name.
<!-- Original -->
<div>Content</div>
<!-- Server returns morphed content with shorthand syntax -->
<div @change="doSomething()">Content</div>
The issue is that setAttribute() validates attribute names strictly, while the browser's HTML parser may have accepted invalid names when parsing the server response.
For now I'm using the full Alpine syntax x-on:change instead of shorthands @change in server responses. It would be nice to support shorthands since they work in the initial DOM and are idiomatic Alpine.js.
