No longer use arguments.callee or RegExp (use new RegExp, instead) for ES 3.1 and...
[jquery.git] / src / support.js
index b11f847..4298250 100644 (file)
        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");
        }