michael@0: function initialize() {}; michael@0: function test() { michael@0: eval("\ michael@0: var Class = {\ michael@0: create : function() {\ michael@0: return function() {\ michael@0: this.initialize.apply(this, arguments);\ michael@0: }\ michael@0: }\ michael@0: };\ michael@0: var Foo = Class.create();\ michael@0: Foo.prototype = {\ michael@0: initialize : function() {\ michael@0: this.bar = Foo();\ michael@0: }\ michael@0: };\ michael@0: var foo = new Foo();\ michael@0: "); michael@0: } michael@0: test();