Opened 15 years ago
Closed 15 years ago
#3134 closed bug (duplicate)
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)
Change History (8)
Changed 15 years ago by
Attachment: | toString.diff added |
---|
comment:1 Changed 15 years ago by
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 15 years ago by
Attachment: | toString-tests.2.diff added |
---|
Complex version but passes all tests
Changed 15 years ago by
Attachment: | toString-tests.diff added |
---|
Added test for alert() and prompt() in IE
Changed 15 years ago by
Attachment: | toString-complex-but-ok.diff added |
---|
Complex version but passes all tests
comment:2 Changed 15 years ago by
Sorry, I messed up with Attach File... Can someone please delete "toString-tests.2.diff"
comment:4 Changed 15 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Change toString functionality in isFunction