On Mon, May 16, 2011 at 10:15 AM, David Herman <dher...@mozilla.com> wrote:
>
> d) At runtime, a function invoked as a non-method gets a dynamic 
> ReferenceError if it tries to refer to |this|. This would just be kind of 
> obnoxious, I think, since if the function wants to test whether it's been 
> called as a non-method it has to do something like
>
>    let nonMethod = false;
>    try { eval("this") } catch (e) { nonMethod = true }
>

There's also more-obnoxious (e), where any function that includes a
reference to |this| produces a ReferenceError immediately when
invoked, instead of when (or if) it refers to |this|.  That's what I
thought Axel was suggesting.
-- 
sam th
sa...@ccs.neu.edu
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to