Found it! calling apply with the function's prototype ( Class.apply(Class.prototype,[...]) ) is the same as calling new.
hope i'm not embarrassing myself, but the main difference between calling a function and using 'new' (at least the way i understand it) is the object ' this' points to. http://www.jsfiddle.net/c2dtW/ This way we can create costum factories to any Function\Object\Class we like. ----------- אריה גלזר 052-5348-561 5561 On Thu, Apr 15, 2010 at 21:34, Sanford Whiteman <[email protected] > wrote: > > I think you wanna look at this gist ;) > > > http://gist.github.com/299387 > > Can you put up a demo of using operator new + opaque arguments object > + returning an instanceof Class using your approach? > > -- S. > > > > -- > To unsubscribe, reply using "remove me" as the subject. >
