• Resolved apedog

    (@apedog)


    I have an old legacy script (before the advent of Promise apparently) in a theme that makes use of a custom event page.ready. And several theme scripts listening to the event like so:

    $(document).on('page.ready', function()... )

    Could it be that jQuery Migrate is falsely recognizing this as \'ready\' event is deprecated ?

    There is no stack trace in jQuery Migrate so I can’t be sure this is the cause. It’s an old script and it works – and refactoring its spaghetti logic should be assiduously avoided.

    I could just change the event name to something else like page.r_e_a_d_y or something less ridiculous, but it’s still a false positive. ie. script might already be compatible with jQuery 3.x as is.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter apedog

    (@apedog)

    Also, possible false-positive on jQuery.type is deprecated when running a script similar to this:

    $(document).on("custom_event", function(event){
        console.log("Responding to event type " + event.type);
    });
    Thread Starter apedog

    (@apedog)

    I think this ticket can be safely closed.

    I’ve narrowed those warnings down to a remote dependency script (pre-3.x). So those errors probably originate there.

    Those were just coincidences (and no stack trace)

    Hi @apedog thank you for the update, I will mark this one as resolved for as suggested.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible false positive ‘ready’ event detected?’ is closed to new replies.