Path: csiph.com!.POSTED.204-73-239-109.cust.centrio.cz!not-for-mail From: Cezary Tomczyk Newsgroups: comp.lang.javascript Subject: Re: why the ! operator can be used to determine a string is null? Date: Thu, 10 Aug 2017 18:52:33 +0200 Organization: csiph.com Internet News Service Message-ID: References: <1939054.irdbgypaU6@PointedEars.de> <11859138.uLZWGnKmhe@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 10 Aug 2017 16:52:34 +0000 (UTC) Injection-Info: csiph.com; posting-host="204-73-239-109.cust.centrio.cz:109.239.73.204"; logging-data="85025"; mail-complaints-to="admin@kev009.com" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 In-Reply-To: Content-Language: en-GB Xref: csiph.com comp.lang.javascript:33762 On 10/08/2017 14:51, Thomas 'PointedEars' Lahn wrote: > Cezary Tomczyk wrote: [...] >> https://developer.mozilla.org/en-US/docs/Glossary/Global_object >> >> "In a web browser, any code which the script doesn't specifically start >> up as a background task has a Window as its global object. This is the >> vast majority of JavaScript code on the Web." > > Never accept claims at face value. I know ;-) Better to check in several, independent places to compare results. >> [...] How do you decide when not to use isHostMethod? > > As a rule of thumb, if the object in question always had the method and it > always worked, I do not feature-test it. Probably I have not been > consistent regarding this as I do not have a suitable DOM Support Matrix > yet, and am checking that on a case-by-case basis. Make sense. I shouldn't be so strict in checking for something that exists for long time. [...] >> I've removed `word-wrap` and added `overflow-x: auto`. It should looks >> better now. > > ACK, it does. Maybe if you use less characters per line (e.g., reduce the > indentation two two spaces) or use a slightly smaller font-size, it looks > even better :) I've reduced a little font-size. :-) > Please trim your quotes to the relevant minimum next time. Done. -- Cezary Tomczyk http://www.ctomczyk.pl/