Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!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: Adding new method to existing object Date: Fri, 16 Mar 2012 03:56:53 -0700 (PDT) Organization: http://groups.google.com Lines: 15 Message-ID: <31786995.22.1331895413978.JavaMail.geo-discussion-forums@vbat19> NNTP-Posting-Host: 79.175.205.52 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1331895757 5065 127.0.0.1 (16 Mar 2012 11:02:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 16 Mar 2012 11:02:37 +0000 (UTC) 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: 1564 Xref: csiph.com comp.lang.javascript:12787 Hi, I want to extend my prototype object using another object. Just created some example code: http://jsfiddle.net/u9e7R/13/ I tested the addMethod function in Firefox 10,11, Chrome 17 and IE 9. But it will fail in IE8. In IE8 console when I run jsCode().test2(); I see 'Object does not support property or method "test2"'. addMethod was based on http://alturl.com/4mk6k, but I tried to code some another few methods, for example by creating temp object, copying properties and set new object in prototype object. But this method in IE8 fails too. Can someone explain me how can I extend existing prototype object using new object? -- Regards, CT