[whatwg] boolean attributes in javascript

Tab Atkins Jr. jackalmage at gmail.com
Tue Dec 8 13:57:47 PST 2009

On Tue, Dec 8, 2009 at 3:48 PM, Brian Kuhn <bnkuhn at gmail.com> wrote:
>>  but it's invalid to set it to anything other than the two values I just
>> mentioned.
> That's the part I'd like to see changed.  I understand that if it's present,
> it's on.  So, why can't async="true" be valid?  I think all browser vendors
> will implement it that way anyway.  They'd be crazy not to.

Indeed, async="true" does set it to be on.  However, so does
async="false", async="off", async="no", and any other string you can
think of that might imply that it's turned off.  Setting it to *any*
value turns it on, so it's best to avoid values that would lead to
confusing results.  The two values that are currently valid are the
minimum necessary, and neither have antonyms that would confuse


More information about the whatwg mailing list