In jQuery, why is this:
$('<div open="whatever">').attr('open')
Always consider 'open' instead of 'whatever' ? On the contrary, it is:
$('<div asdf="whatever">').attr('asdf')
Computes to 'whatever' as expected.
Yes, I know that open and asdf are not valid HTML attributes; I am not looking for answers that say something like "just use data-open ", etc. I am looking for an explanation of the behavior described above.
source share