3 ms·
> code written against 1.5.2 will work 100% against 1.6.1 Nope. attr() returns a different value than it did before 1.6. Anything that relied on that value (eg
by crescentfresh 15y ago
> code written against 1.5.2 will work 100% against 1.6.1
Nope. attr() returns a different value than it did before 1.6. Anything that relied on that value (eg $elem.attr('disabled') == true/false) is still going to break.
- jeresig 15y agoActually == true and == false will still work, === true and === false will fail (as the return value is now "disabled" or undefined).
- crescentfresh 15y agoI meant, explicit checks on the return value will break (not that this is a bad thing). Specifically, neither `'disabled' == true` nor `undefined == false` will ever be true[thy] and are thus breaking changes. Perhaps you meant implicit conversions to boolean still working? Eg `!!'disabled'`, `if ('disabled')`, `!!undefined`, or `if (undefined)` will continue to work.