Small Proposal "!in"
Mike Samuel
mikesamuel at gmail.com
Thu Jul 19 13:47:44 UTC 2018
On Thu, Jul 19, 2018 at 9:26 AM Michael Theriot <
michael.lee.theriot at gmail.com> wrote:
> > 'string' === typeof document.createElement('input').type
> > // true
>
> It should be noted this is a "loose check"; it does not determine whether
> or not the property exists when its value equals undefined. It also
> triggers getters, whereas `in` reports whether or not the property exists
> without triggering a getter.
>
Good point. `in` does trigger "has" proxy handlers though, so neither is
side-effect free.
> _______________________________________________
> 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/20180719/b859bed2/attachment.html>
More information about the es-discuss
mailing list