Ticket #9910 (closed enhancement: fixed)
Generally document behavior of setters when passed function returns undefined
|Reported by:||tj@…||Owned by:|
In ticket #8770, the attr function's behavior was clarified for when it's passed a callback function to use to set the value and the function returns undefined.
This applies generally to setters, though, like css, prop, presumably others. Recommend documenting the behavior consistently and clearly (the current attr wording is technically accurate, but convoluted). Something along the lines of:
Note: If the setter callback doesn't return a value or returns undefined, the current value is not changed. This can be useful for selectively setting values only when certain criteria are met.
- Keywords neededdocs added
- Priority changed from undecided to low
- Status changed from new to closed
- Component changed from unfiled to attributes
- Resolution set to fixed