Hacker News new | past | comments | ask | show | jobs | submit login

You can't use arguments.callee when in strict mode. So far the only alternative is to manually encode the class name and argument list:

    if(!(this instanceof MyClass)){
        return new MyClass(a,b,c)
    }



Correct. But, like John Resig, I am gonna miss it...

    "Personally, I’m going to miss arguments.callee,
     I used it in a number of places in my code."

     -- John Resig (May 22, 2009 at 7:26 am) [1]
----

[1]: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: