Skip to main content

Bug Tracker

Side navigation

#3134 closed bug (duplicate)

Opened July 06, 2008 02:22PM UTC

Closed July 23, 2008 04:20PM UTC

Tweak to .isFunction

Reported by: john Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:
Description

Based upon discussion in jQuery-dev, a tweak to the isFunction method to make it more robust.

It will no longer fail in cases like this:

function Test(){}
Test.toString = function(){ return "Test"; };
Attachments (4)
  • toString-complex-but-ok.diff (0.7 KB) - added by genezys July 07, 2008 09:54AM UTC.

    Complex version but passes all tests

  • toString-tests.2.diff (0.9 KB) - added by genezys July 07, 2008 09:52AM UTC.

    Complex version but passes all tests

  • toString-tests.diff (1.1 KB) - added by genezys July 07, 2008 09:53AM UTC.

    Added test for alert() and prompt() in IE

  • toString.diff (0.5 KB) - added by john July 06, 2008 02:23PM UTC.

    Change toString functionality in isFunction

Change History (4)

Changed July 07, 2008 09:22AM UTC by genezys comment:1

Hi, I started following the jquery-dev list and thought I could help for this one.

First, I will attach a patch to add the two failing tests to the jQuery unit tests.

Then, I should add that applying the current patch seems to be breaking a lot of unit tests right now. I will be investigating the issue.

Changed July 07, 2008 09:55AM UTC by genezys comment:2

Sorry, I messed up with Attach File... Can someone please delete "toString-tests.2.diff"

Changed July 07, 2008 08:42PM UTC by genezys comment:3

This bug is fixed by a patch in #2968

Changed July 23, 2008 04:20PM UTC by flesler comment:4

resolution: → duplicate
status: newclosed

Duplicate of #2968. Fixed on [5792].