Subclassing Function
Francisco Tolmasky
tolmasky at gmail.com
Thu May 7 19:50:19 UTC 2015
In the existing implementations I’ve tried, it appears I can’t do this:
class SuperFunction extends Function { }
(also tried with constructor(str) { super(str) })
It “works”, but the resulting new SuperFunction(“return 5”) is just a
Function, not a SuperFunction. Is Function meants to be an exception to the
subclassing built-ins, or should it also work?
Thanks,
Francisco
--
Francisco Tolmasky
www.tolmasky.com
tolmasky at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150507/8bb39061/attachment.html>
More information about the es-discuss
mailing list