Failing tests and fix for writeAttribute #81

wants to merge 2 commits into


None yet

2 participants


Failing unit tests for ticket 1431
writeAttribute('checked') and writeAttribute('style') create additional attribute with name undefined

@savetheclocktower savetheclocktower commented on the diff Nov 2, 2012
@@ -2353,8 +2353,8 @@
name = table.names[attr] || attr;
value = attributes[attr];
if (table.values[attr])
- name = table.values[attr](element, value);
- if (value === false || value === null)
+ table.values[attr](element, value);
+ else if (value === false || value === null)
savetheclocktower Nov 2, 2012 collaborator

Seems like putting the else in here would break being able to say (e.g.)…

checkBox.writeAttribute('checked', false);

…and having the checked attribute be removed.


I ended up merging @sdumitriu's pull request instead, but thanks again for being so vigilant on the bug tracker.


I've missed somehow that pull request, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment