Proposal: allow primitives to be explicitly returned from constructors
Naveen Chawla
naveen.chwl at gmail.com
Fri Apr 20 13:49:47 UTC 2018
What's the use case? Maybe there's a nice way of doing what you want
On Fri, 20 Apr 2018 at 19:17 T.J. Crowder <tj.crowder at farsightsoftware.com>
wrote:
> On Fri, Apr 20, 2018 at 2:23 PM, Oriol _
> <oriol-bugzilla at hotmail.com> wrote:
> > No, `typeof` is not reliable, because it's implementation-defined
> > for non-standard non-callable exotic objects.
> >
> > For example, old IE used to return `"unknown"` in various cases.
>
> Also `"object"` for host-provided functions (such as
> `document.createElement`); IE8 still does that. (Thankfully IE11 doesn't.)
> (I suppose that would have passed Isiah's `isObject` test anyway, but the
> point is that `typeof` is, sadly, a weak reed...)
>
> -- T.J. Crowder
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180420/3978e429/attachment.html>
More information about the es-discuss
mailing list