> Le 25 août 2016 à 17:17, Claude Pache <claude.pa...@gmail.com> a écrit :
> 
> 
>> Le 25 août 2016 à 16:05, Alexander Mekhonoshin <invn...@yandex-team.ru 
>> <mailto:invn...@yandex-team.ru>> a écrit :
>> 
>> 
>> 2. unary ?.
>> 
>> window?.navigator?.toString()
>> 
>> browser: "[object Navigator]"
>> node: ReferenceError: window is not defined
>> 
>> here i suggest syntax for exception-slient accesing globals:
>> 
>> ?.a === hostGlobalObject?.a
>> ?.a?.b === hostGlobalObject?.a?.b
> 
> For accessing the global object, I think that the current System.global 
> proposal is a better call, because it adds no syntax. See:
> 
> https://github.com/tc39/proposal-global 
> <https://github.com/tc39/proposal-global>
> 
> `System.global?.navigator.toString()` is somewhat lengthy, but it is 
> nevertheless simple and clear.
> 

Correction: `System.global.navigator?.toString()`


> —Claude


_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to