Ticket #7610 (closed enhancement: invalid)
.ready (and .readyWait) should really be implemented using the Events API
|Reported by:||cowboy||Owned by:|
Ideally, .ready( fn ) and $( fn ) should both be shortcuts for .bind( "ready", fn ), perhaps with the exception that fn in .ready( fn ) and $( fn ) is curried so that $ is passed in as a function argument instead of event (or is passed in before the event argument).
Instead of some plugin incrementing the .readyWait property to indicate that the "ready" event needs to be deferred, that plugin could instead bind a "ready" event handler that calls e.preventDefault() or e.stopPropagation() (as necessary depending on the implementation) to prevent other "ready" event handlers from firing. Once the plugin is actually ready, it could then unbind itself and re-trigger the "ready" event.
Or something along those lines.
Either way, it would be nice for the "ready" event to behave more similarly to other jQuery events, instead of being a somewhat awkward special case.