, Dojo arguments.callee
( ) . , arguments
, arguments.callee
Dojo . - , , , , , override.js
:
"use strict";
define([], function () {
var slice = Array.prototype.slice;
return function (method) {
var proxy;
proxy = function () {
var me = this;
var inherited = (this.getInherited && this.getInherited({
callee: proxy,
length: 0
})) || function () {};
return method.apply(me, [function () {
return inherited.apply(me, arguments);
}].concat(slice.apply(arguments)));
};
proxy.method = method;
proxy.overrides = true;
return proxy;
};
});
define([
'dojo/_base/declare',
'dojo/topic',
'dojo/_base/lang',
'./override'
], function (
declare,
topic,
lang,
override
) {
'use strict';
var attachTo = 'myPanels';
return declare(null, {
id: null,
title: null,
postCreate: override(function (inherited) {
inherited();
this.placeAt(attachTo);
}),
methodWithArgs : override(function(inherited, arg1, arg2)) {
inherited(arg1, arg2);
}),
constructor: function () {
},
});
});