You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an app that assuming jQuery.holdReady() is called. So I can call jQuery.holdReady(false) whenever I'm ready. The problem is DOMContentLoaded is probably not triggered yet. Do you guys consider this as a bug? Also readyWait: 1, as a initially value is probably not intuitive. If we treat this as a bug I think the code would look better without this magic number :)
Bug Reports:
Note that we only can fix bugs in the latest (1.x, 2.x, 3.x) versions of jQuery.
Briefly describe the issue you've encountered
What do you expect to happen?
Calling jQuery.holdReady(false) without calling jQuery.holdReady() should not trigger jQuery.ready() if dom is actually not ready.
What acually happens?
Calling jQuery.holdReady(false) without calling jQuery.holdReady() triggering jQuery.ready() and jQuery actually think dom is ready.
http://api.jquery.com/jQuery.holdReady/ is pretty clear on jQuery.holdReady being an advanced feature, and on proper use consisting of jQuery.holdReady( true ) followed by jQuery.holdReady( false ). Not only that, but we have decided to deprecate it entirely as suggested in #1778 (comment) .
I'm closing this for now, but if anyone considers it a mistake please post here and we'll consider reopening. But regardless, I recommend replacing uses of the functionality with jQuery.when( jQuery.ready, jQuery.Deferred( waitForMyDependencies ) ) as suggested in #2850 (comment) .
Description
I have an app that assuming
jQuery.holdReady()
is called. So I can calljQuery.holdReady(false)
whenever I'm ready. The problem isDOMContentLoaded
is probably not triggered yet. Do you guys consider this as a bug? AlsoreadyWait: 1,
as a initially value is probably not intuitive. If we treat this as a bug I think the code would look better without this magic number :)Bug Reports:
Note that we only can fix bugs in the latest (1.x, 2.x, 3.x) versions of jQuery.
Briefly describe the issue you've encountered
Calling
jQuery.holdReady(false)
without callingjQuery.holdReady()
should not triggerjQuery.ready()
if dom is actually not ready.Calling
jQuery.holdReady(false)
without callingjQuery.holdReady()
triggeringjQuery.ready()
and jQuery actually think dom is ready.Provide a minimal test case, see https://webkit.org/test-case-reduction/
Use the latest shipping version of jQuery in your test case!
We prefer test cases on https://jsbin.com or https://jsfiddle.net
I was going backward and forward whether I should open an issue. But I can totally provide a test case for this.
The text was updated successfully, but these errors were encountered: