[jQuery] jQuery and Object.prototype extensions
Thanks... I figured that the object was being used as an associative array
but wasn't sure.
I 'spose I'll move .toXml() and .toQueryString() elsewhere, but .about()
stays!
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On
Behalf Of Blair Mitchelmore
Sent: Monday, July 31, 2006 4:00 PM
To: jQuery Discussion.
Subject: Re: [jQuery] jQuery and Object.prototype extensions
You're extending on the Object object via it's prototype property which
means ALL objects inherit your extension function.
The javascript "for (var i in object)" iterator (used in handleEvent) goes
through all things inside objects including your extension function. There's
been much discussion about using Object.prototype and it's generally decided
upon to leave it alone and create your own object and prototype that. Hope
that helps.
-blair
Tony Collins