鍍金池/ 問答/HTML/ 嚴格模式下報錯 'caller', 'callee', and 'argumen

嚴格模式下報錯 'caller', 'callee', and 'arguments' properties

input.on( 'change', function( e ) {
                    var fn = arguments.callee,
                        clone;

                    me.files = e.target.files;

                    // reset input
                    clone = this.cloneNode( true );
                    clone.value = null;
                    this.parentNode.replaceChild( clone, this );

                    input.off();
                    input = $( clone ).on( 'change', fn )
                            .on( 'mouseenter mouseleave', mouseHandler );

                    owner.trigger('change');
                });

                label.on( 'mouseenter mouseleave', mouseHandler );

圖片描述

回答
編輯回答
我以為

嚴格模式不支持arguments.callee

2018年1月18日 04:17
編輯回答
大濕胸

嚴格模式不支持arguments.caller、arguments.callee。
如果你要調(diào)用自己,給你的匿名函數(shù)起個名字就好。
比方說:settimeout(function foo(){... foo();})

2017年9月17日 15:45