Skip to content

calling jQuery.holdReady(false) without jQuery.holdReady() will trigger jQuery.ready() without DOMContentLoaded #3287

@stevemao

Description

@stevemao

Description

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.

I was going backward and forward whether I should open an issue. But I can totally provide a test case for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions