ember/ember-3.4.8.template-compiler.js
/**
      Wraps the passed function so that `this._super` will point to the superFunc
      when the function is invoked. This is the primitive we use to implement
      calls to super.
    
      @private
      @method wrap
      @for Ember
      @param {Function} func The function to call
      @param {Function} superFunc The super function.
      @return {Function} wrapped function.
    */
Wraps the passed function so that `this._super` will point to the superFunc
when the function is invoked. This is the primitive we use to implement
calls to super.
Wraps the passed function so that ` this . _super ` will point to the superFunc when the function is invoked . This is the primitive we use to implement calls to super .
function _wrap(func, superFunc) {
        function superWrapper() {
            var orig = this._super;
            this._super = superFunc;
            var ret = func.apply(this, arguments);
            this._super = orig;
            return ret;
        }
        IS_WRAPPED_FUNCTION_SET.add(superWrapper);
        setObservers(superWrapper, getObservers(func));
        setListeners(superWrapper, getListeners(func));
        return superWrapper;
    }
function _wrap ( func , superFunc ) { function superWrapper ( ) { var orig = this . _super ; this . _super = superFunc ; var ret = func . apply ( this , arguments ) ; this . _super = orig ; return ret ; } IS_WRAPPED_FUNCTION_SET . add ( superWrapper ) ; setObservers ( superWrapper , getObservers ( func ) ) ; setListeners ( superWrapper , getListeners ( func ) ) ; return superWrapper ; }
Wraps the passed function so that `this._super` will point to the superFunc
when the function is invoked.
Wraps the passed function so that ` this . _super ` will point to the superFunc when the function is invoked .