Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: cezary.tomczyk@gmail.com Newsgroups: comp.lang.javascript Subject: Re: Adding new method to existing object Date: Sat, 17 Mar 2012 05:24:13 -0700 (PDT) Organization: http://groups.google.com Lines: 17 Message-ID: <8579633.960.1331987053327.JavaMail.geo-discussion-forums@vbux23> References: <31786995.22.1331895413978.JavaMail.geo-discussion-forums@vbat19> NNTP-Posting-Host: 79.175.205.52 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1331987383 6485 127.0.0.1 (17 Mar 2012 12:29:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 17 Mar 2012 12:29:43 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=79.175.205.52; posting-account=fqiM0AoAAACu3aIqzAK2xf9RRpymvKVH User-Agent: G2/1.0 Xref: csiph.com comp.lang.javascript:12847 W dniu sobota, 17 marca 2012, 04:15:52 UTC+1 u=C5=BCytkownik Scott Sauyet n= apisa=C5=82: > CT wrote: [...] > //~ I just attach this to the global namespace here instead > //~ of using the `global` variable to reference `this`. As for global variable with this object I just use now: (function(){ return this || (1,eval)('this') })() based on article http://perfectionkills.com/unnecessarily-comprehensive-loo= k-into-a-rather-insignificant-issue-of-global-objects-creation/ --=20 Regards, CT