kotlinx.html
kotlinx.html copied to clipboard
Attribute names don't accept Alpine.js directives
alpine.js has directives expressed in html attribute like
<div x-data="{ sidebarOpen: false }" @keydown.window.escape="sidebarOpen = false">
The problem is the @ prefix on the 2nd attribute. This appears to be the same as https://github.com/Kotlin/kotlinx.html/issues/118 which is also unresolved.
Both issues appear valid according to the html spec referenced in https://github.com/Kotlin/kotlinx.html/issues/118, but kotlinx.html is silently discarding them
@cy6erGn0m would it be hard to fix both of these?
This can be worked around a longer form, which looks like
attributes["x-on:keydown.window.escape"] = "sidebarOpen = false"
instead of
attributes["@keydown.window.escape"] = "sidebarOpen = false"
but the later is still valid to the html spec, so whether is should be supported is the question
Any news on this?
There are many frameworks which have this syntax