Ticket #11962 (closed bug: fixed)
Standardize getter return values for empty sets.
|Reported by:||cowboy||Owned by:|
Description (last modified by cowboy) (diff)
Just like getter-setter detection logic has been standardized on arguments, it might be a good idea for empty-set getters to always return a consistent value. I vote for null.
I also understand if .text() must continue to behave differently, because it's already a special case in other ways, and we need something to laugh at ironically.
$.fn.jquery // "1.7.2" $().attr("x") // undefined $().prop("x") // undefined $().css("x") // undefined $().val() // undefined $().text() // "" $().html() // null $().offset() // null
Please don't do this in a patch release, though! <3 (zing)
- Description modified (diff)
- Summary changed from Standardize getter return values on empty set. to Standardize getter return values for empty sets.
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to attributes
- Milestone changed from None to 1.8