Bug Tracker

Modify

Ticket #2969 (closed bug: wontfix)

Opened 5 years ago

Last modified 4 years ago

Add failsafe check to jQuery.ready()

Reported by: sun Owned by:
Priority: major Milestone: 1.3
Component: event Version: 1.2.5
Keywords: ready, readylist, readylist.push Cc: sun
Blocking: Blocked by:

Description

I just spent plenty of time to debug why all of my JavaScript was broken and finally found out that a single function name inside of document.ready(example_function()) was not callable. Would a simple patch as in  http://sun.pastebin.us/pastebin.php?diff=d64e38491 (or similar) be accepted?

Attachments

jquery.ready-callable.patch Download (401 bytes) - added by sun 5 years ago.
Patch against jQuery 1.2.6

Change History

Changed 5 years ago by sun

Patch against jQuery 1.2.6

comment:1 Changed 5 years ago by flesler

I think it's easy to realize you made a mistake if all fails, than having one single function not executing that you don't know why.

comment:2 Changed 5 years ago by flesler

  • Component changed from core to event

comment:3 Changed 4 years ago by dmethvin

This seems like the wrong way to address the problem. The proposed patch silently ignores any argument that isn't a function. The current behavior throws an error, so it's at least giving some hint that there is a problem in the code.

comment:4 Changed 4 years ago by sun

Please close this issue. (I can't see how/where I could do that)

I was dumb, and jQuery improved over time.

comment:5 Changed 4 years ago by flesler

  • Cc sun added
  • Status changed from new to closed
  • Resolution set to wontfix

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.