Will the following alert Foo in all browsers, even when minified? class Foo alert(Foo.name)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That may depend on which version of the CoffeeScript compiler you’re using. In the lastest stable release (1.3.3), a “name” property isn’t generated by default.
compiles into
Since the
nameproperty is non-standard and currently not supported by the IE, you cannot really rely on it cross-browser. Detailed information about this are available at the MDN: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/Name