- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 14 Jul 2011 14:35:40 -0700
On Thu, Jul 14, 2011 at 1:52 PM, Tantek ?elik <tantek at cs.stanford.edu> wrote: > Also the empty download attribute doesn't work as it is supposed to be > equivalent to download="download" which would simply name the file > "download" which is unlikely what author or user want. This is incorrect. If you omit an attribute's value it becomes the empty string. See this testcase: <!DOCTYPE html> <body foo> </body> <script> alert(document.body.getAttribute('foo')); </script> (In SGML languages, omitting an attribute's value was *actually* omitting the attribute name, and the name was inferred from looking in the DTD for what attribute had that as a possible enumerated value. This is why XHTML1 requires boolean attributes to be written as foo='foo'. XHTML5, though, prefers the form foo='', as that makes the value identical to what it would be as an HTML boolean attribute.) ~TJ
Received on Thursday, 14 July 2011 14:35:40 UTC