```a(...) { attributes["download"] = "..." }``...
# ktor
m
Copy code
a(...) {
    attributes["download"] = "..."
}
is what you're looking for I think
🧵 2
👀 1
a
a yes! i just tried that and it works, but
the resulting html includes the download as
download =""
. Which works for sure, but I am not sure if it would work on all browsers
hopefully if someone knows an other approach, they’ll share it
a
I don't think it's possible due to the implementation:
Copy code
if (tag.attributes.isNotEmpty()) {
    tag.attributesEntries.forEachIndexed { _, e ->
        if (!e.key.isValidXmlAttributeName()) {
            throw IllegalArgumentException("Tag ${tag.tagName} has invalid attribute name ${e.key}")
        }

        out.append(' ')
        out.append(e.key)
        out.append("=\"")
        out.escapeAppend(e.value)
        out.append('\"')
    }
}
a
@Aleksei Tirman [JB] do you happen to know whether it is intentionally left out?
a
Unfortunately, I don't know.
👍 1