Skip to main content

Bug Tracker

Side navigation

#7214 closed bug (duplicate)

Opened October 16, 2010 05:08PM UTC

Closed November 23, 2010 04:58PM UTC

Last modified January 31, 2011 05:55PM UTC

document jQuery.readyWait

Reported by: texec Owned by:
Priority: low Milestone: 1.5
Component: misc Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
Description

jQuery.fn.ready contains no test for jQuery.readyWait, so readyWait is totally useless at the moment. Recommend fix:

jquery-1.4.3.js, line 280:
- if ( jQuery.isReady ) {
+ if ( jQuery.isReady && jQuery.readyWait <= 0 ) {

If not, I don't understand how to use readyWait and it should be better documented.

Attachments (0)
Change History (10)

Changed October 16, 2010 06:08PM UTC by jitter comment:1

_comment0: I think this bug report is invalid. \ \ [http://jsfiddle.net/jitter/kqBbQ/ readyWait sample] to show usage of `readyWait` and that `readyWait`is working as expected.1287252625256761
_comment1: I think this bug report is invalid. \ \ [http://jsfiddle.net/jitter/kqBbQ/show readyWait sample] to show usage of `readyWait` and that `readyWait`is working as expected. ([http://jsfiddle.net/jitter/kqBbQ code view])1287252637247024
_comment2: I think this bug report is invalid. \ \ [http://jsfiddle.net/jitter/kqBbQ/show readyWait sample] to show usage of `readyWait` and that `readyWait`is working as expected.1287252654040506

I think this bug report is invalid.

readyWait sample to show usage of readyWait and that it is working as expected.

Changed October 16, 2010 10:16PM UTC by snover comment:2

component: unfiledmisc
priority: undecidedlow
status: newopen
summary: jQuery.fn.ready does not respect jQuery.readyWaitdocument jQuery.readyWait

Changed October 19, 2010 11:01PM UTC by anonymous comment:3

I don't think so. It's very easy - if $() is called after the event fired your example fails.

Changed October 21, 2010 08:04AM UTC by fbuchinger comment:4

@anonymous: your[http://jsfiddle.net/dBS4Z/ modified version] of the readyWait sample fails because you used an invalid type attribute in your second script tag: <script type='txt/javascript'> instead of <script type='text/javascript'>. This causes the browser to ignore the script.

Nevertheless, the original version of the example is pretty weird.... jQuery.readyWait += 2 WTF??? - simply setting it to true would have made things more clear. Why is the first script in CDATA and the second not...? 2 explanatory comments along the jQuery.readyWait/jquery.ready(true) lines would have been nice

Changed October 21, 2010 10:57PM UTC by snover comment:5

milestone: 1.4.41.4.5

Retargeting due to severity of regressions in 1.4.3.

Changed October 22, 2010 07:48PM UTC by texec comment:6

@fbuchinger Oops, my mistake. But if you use this outside a testcase in a real world environment with large scripts this is 100% reproducible. Simply look at the code and check what happens if jquery.isReady is set before jquery.ready(function…) is called.

@snover: ''Retargeting due to severity of regressions in 1.4.3.'' This is a joke isn't it? We have too many bugs so we don't even try to solve the very simple ones?

Changed November 23, 2010 04:58PM UTC by jitter comment:7

resolution: → duplicate
status: openclosed

Added info on #6781 that readyWait needs to be documented on api.jquery.com

Changed November 23, 2010 04:58PM UTC by jitter comment:8

Duplicate of #6781.

Changed January 31, 2011 05:53PM UTC by john comment:9

version: 1.4.31.5

There wasn't a 1.4.5 release, was actually 1.5.

Changed January 31, 2011 05:55PM UTC by john comment:10

milestone: 1.4.51.5

There was no 1.4.5 release, was actually 1.5.