self.injector.mapClass('mediators', Mediators, true);
self.mediators = self.injector.getValue('mediators');
vo.value = this.createInstance.apply(this, args);
return new (Function.prototype.bind.apply(TargetClass, args))();
I'm afraid I can't do that. Function.prototype.bind is native Javascript.
It has been added in June 2011 (Standard ECMA-262):
http://www.ecma-international.org/publications/standards/Ecma-262.htm
The bind function I'm adding is just the Mozilla shim for older browser:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
Romu
What could be changed is a way to instantiate a new function with params and the right scope. Even though I never found a way of doing that without Function.prototype.bind.
You could fork infuse.js and try to find an alternative for the syntax, and check that the tests are going through. I can guide you after that to rebuild soma.js with your version of infuse.js, unless I implement it myself if the solution is fine.
Romu