Open pcarrier opened 3 days ago
deno-dom will try to follow the HTML standard, and HTML attributes must always have a value even if it's empty. The parser (just like any browser HTML parser) will parse them as a shorthand for attributes with an empty string value. Setting them from the DOM API will always require a string value even if that value is an empty string because that is what the HTML DOM API requires.
Thanks! I would love access to the shorthand when serializing to HTML. It does turn out to be lacking from browsers too though.
Can't find a way to construct a node like
<option selected>
as opposed to<option selected="">
. Is that an option I missed?