RE: [Dynapi-Dev] Extending native objects

2001-06-11 Thread Eytan Heidingsfeld
I don't agree exactly with what scott said, but the image object is a very weird one because it also represents a JS object and also an HTML object. 8an ___ Dynapi-Dev mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/dynapi-d

Re: [Dynapi-Dev] Extending native objects

2001-06-11 Thread Scott Andrew LePera
I tried to do something like this once before, with unpredictable results. Part of the problem this works better in Netscape, I think, is because Image is decended from Object, like almost all DHTML objects in NS. IE, on the other hand, has different top-level DHTML objects, so Image may not hav

Re: [Dynapi-Dev] Extending native objects

2001-06-11 Thread michael buerge
it seems so!! as in my example, i tried to extend the Image-object, which happened not to work in IE/win.   - Original Message - From: Michael Pemberton To: [EMAIL PROTECTED] Sent: Monday, June 11, 2001 4:36 PM Subject: Re: [Dynapi-Dev] Extending native

Re: [Dynapi-Dev] Extending native objects

2001-06-11 Thread Michael Pemberton
the following is from some code that I included in ym api for some reason, don't really use it that much. String.prototype.trim=function(side) {     var tmp=this.toString();     if (side!="right") tmp=tmp.replace(/^\s+/, "");     if (side!="left") tmp=tmp.replace(/\s+$/, "");     return tmp; }; S

[Dynapi-Dev] Extending native objects

2001-06-11 Thread "Bürge, Michael"
is there a way in IE to extend a browserdefined object? i tried to do something like this: MyImage = function() { this.superClass = Image; this.superClass(); } MyImage.prototype = new Image; ...but it didn't inherit anything. The following also doesn't work: Image.prototype.somemethod = fu