Permalink
2 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9e3f053
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't the named function expression
then
"leak" into_deferred
's scope in IE < 9? I thinkthen
needs to benull
ed probably somewhere around line 888 (var then = null;
) so JScript's GC can do its job properly. (http://kangax.github.com/nfe/#jscript-bugs).Also, this type of NFE might break in Safari 2.x (http://kangax.github.com/nfe/#safari-bug).
Or because the NFE's purpose isn't for debugging the function itself why not just use
deferred.then.apply( this, elem );
and get rid of the NFE altogether (no other parts of jQuery have them, right?). If you absolutely must keep thethen.apply( this, elem );
line as-is declarethen
as a function declaration in_deferred
's body then set it up as:deferred = { then: then, ... };
.9e3f053
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better safe than sorry: c810c62
Thanks for the warning :)