Re: [JSMentors] "new" implementation

2011-07-15 Thread Dmitry Baranovskiy
I would suggest to fix prototype reference and ensure that all objects that are returned from constructor are taken into account be it functions or anything else. Something across these lines: function NEW(f) { var obj, out; if (Object.create) { obj = Object.create(f.protot

[JSMentors] Re: When do elements get their style attribute values?

2011-07-15 Thread Clothears
On Jul 15, 5:17 am, pete otaqui wrote: > Hi Clothears, > > Stylesheets are loaded asynchronously, ... On Jul 15, 2:52 am, Diego Perini wrote: > OK, > in Safari it seems stylesheet are loaded asynchronously. Diego and Pete, Thanks - that's a helpful suggestion about what's going on and what I

Re: [JSMentors] "new" implementation

2011-07-15 Thread Peter van der Zee
On Fri, Jul 15, 2011 at 1:38 PM, Xavier MONTILLET wrote: > Hi, > > I think you should je return whaterver is returned by the constructor. Nah, construtors always return an object. If you don't (ie. `return 5;`), the original new instance is returned anyways. I would suggest you use a blacklist f

Re: [JSMentors] "new" implementation

2011-07-15 Thread Xavier MONTILLET
Hi, I think you should je return whaterver is returned by the constructor. And typeof {}==='object' All lowercase Your second call should be apply And constructor isn't a property of instances, it is a property of the prototype if i remember welll. I'll post an implementation later if noone el