Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.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: Fri, 16 Mar 2012 10:46:03 -0700 (PDT) Organization: http://groups.google.com Lines: 23 Message-ID: <7596121.1342.1331919963571.JavaMail.geo-discussion-forums@vbtv42> 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 1331919963 27723 127.0.0.1 (16 Mar 2012 17:46:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 16 Mar 2012 17:46:03 +0000 (UTC) Cc: jgharris@ic4life.net 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 X-Received-Bytes: 1865 Xref: csiph.com comp.lang.javascript:12808 W dniu pi=C4=85tek, 16 marca 2012, 18:09:55 UTC+1 u=C5=BCytkownik John G Ha= rris napisa=C5=82: > On Fri, 16 Mar 2012 at 03:56:53, in comp.lang.javascript, wrote: >=20 > > >Can someone explain me how can I extend existing prototype object using > >new object? >=20 > Thing.prototype.blobby =3D new WhatsIt(); >=20 > Or did you mean >=20 > Thing.prototype =3D new Thing(a, b, c); >=20 > In general, what do you mean by 'extend', and do you want to create a > new type of object or a modified current type? You didn't say. 'Extend' I mean create a new type of object (usually function) and then add= that to existing object. --=20 Regards, CT