Optional Chaining (aka Existential Operator, Null Propagation)
zenparsing at gmail.com
Fri Feb 5 17:50:15 UTC 2016
> In case `myForm.querySelector('select[name=foo]')` is not null, then
> `myForm.querySelector('select[name=foo]').selectedOptions` is always an
> HTMLCollection and has always a `length` property. If it is not the case,
> then either I made a typo, or I am testing some ancient browser that
> doesn’t support yet the `selectedOptions` property. In both cases, I want
> an exception to be thrown rather than an error to be dropped: it's easier
> to debug.
Makes sense, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss