ES4 draft: Function

Erik Arvidsson erik.arvidsson at gmail.com
Mon Mar 10 19:46:15 PDT 2008


There are valid use cases for new Function (...) and Function(...).
One that comes to mind is getting an attribute in DOM and make it into
an event handler.  Yes, the Function constructor and meta::invoke can
be replaced by eval but Function needs to be there for ES3
compatibility.

On Mon, Mar 10, 2008 at 18:38, Jon Zeppieri <jaz at bu.edu> wrote:
> On 3/10/08, Lars Hansen <lhansen at adobe.com> wrote:
>  > First draft of the spec for the Function class.  Please comment.
>  >
>
>  Suggestion: deprecate the Function constructor and static invoke().
>
>  Almost all of its uses are better handled by function expressions and,
>  in those cases where eval() in required, one can use eval().
>
>  -Jon
>
>
> _______________________________________________
>  Es4-discuss mailing list
>  Es4-discuss at mozilla.org
>  https://mail.mozilla.org/listinfo/es4-discuss
>



-- 
erik



More information about the Es4-discuss mailing list