No longer use arguments.callee or RegExp (use new RegExp, instead) for ES 3.1 and Caja compatibility. Fixes jQuery bug #4251.

This commit is contained in:
John Resig 2009-02-26 18:00:41 +00:00
parent 410e13b400
commit 985856b823
3 changed files with 7 additions and 7 deletions

View file

@ -75,11 +75,11 @@
root.removeChild( script );
if ( div.attachEvent && div.fireEvent ) {
div.attachEvent("onclick", function(){
div.attachEvent("onclick", function click(){
// Cloning a node shouldn't copy over any
// bound event handlers (IE does this)
jQuery.support.noCloneEvent = false;
div.detachEvent("onclick", arguments.callee);
div.detachEvent("onclick", click);
});
div.cloneNode(true).fireEvent("onclick");
}