#7214 closed bug (duplicate)
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.
Change History (10)
comment:2 Changed 12 years ago by
Component: | unfiled → misc |
---|---|
Priority: | undecided → low |
Status: | new → open |
Summary: | jQuery.fn.ready does not respect jQuery.readyWait → document jQuery.readyWait |
comment:3 Changed 12 years ago by
I don't think so. It's very easy - if $() is called after the event fired your example fails.
comment:4 Changed 12 years ago by
@anonymous: yourmodified 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
comment:5 Changed 12 years ago by
Milestone: | 1.4.4 → 1.4.5 |
---|
Retargeting due to severity of regressions in 1.4.3.
comment:6 Changed 12 years ago by
@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?
comment:7 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | open → closed |
Added info on #6781 that readyWait needs to be documented on api.jquery.com
comment:9 Changed 12 years ago by
Version: | 1.4.3 → 1.5 |
---|
There wasn't a 1.4.5 release, was actually 1.5.
comment:10 Changed 12 years ago by
Milestone: | 1.4.5 → 1.5 |
---|
There was no 1.4.5 release, was actually 1.5.
I think this bug report is invalid.
readyWait sample to show usage of
readyWait
and that it is working as expected.