##// END OF EJS Templates
Added childContainer service to container services, ServiceContaier is destroyable, fixed browser Uuid version
Added childContainer service to container services, ServiceContaier is destroyable, fixed browser Uuid version

File last commit:

r51:43a2828f8abe v1.2.0-rc di-typescript
r146:f3f5c56d3b3e v1.4.0-rc5 default
Show More
override.js
72 lines | 1.7 KiB | application/javascript | JavascriptLexer
"use strict";
define([], function () {
var slice = Array.prototype.slice;
var override = function (method) {
var proxy;
/** @this target object */
proxy = function () {
var me = this;
var inherited = (this.getInherited && this.getInherited(proxy.nom, {
callee: proxy
})) || function () {};
return method.apply(me, [function () {
return inherited.apply(me, arguments);
}].concat(slice.apply(arguments)));
};
proxy.method = method;
proxy.overrides = true;
return proxy;
};
override.before = function (method) {
var proxy;
/** @this target object */
proxy = function () {
var me = this;
var inherited = (this.getInherited && this.getInherited(proxy.nom, {
callee: proxy
})) || function () {};
method.apply(me, arguments);
return inherited.apply(me, arguments);
};
proxy.method = method;
proxy.overrides = true;
return proxy;
};
override.after = function (method) {
var proxy;
/** @this target object */
proxy = function () {
var me = this;
var inherited = (this.getInherited && this.getInherited(proxy.nom, {
callee: proxy
})) || function () {};
inherited.apply(me, arguments);
return method.apply(me, arguments);
};
proxy.method = method;
proxy.overrides = true;
return proxy;
};
override.hide = function (method) {
method.overrides = false;
return method;
};
return override;
});