I'm confused. Are these expandos proprietory Microsoft attributes with a specific meaning, or can it also apply to a non-standard attribute that I may invent for a particular purpose (eg all collapsible elements on a page might have a custom attribute collapsible="true")? If it's the latter, I don't see how such attributes can reference anything at all, at least as far as the DOM model is concerned. They're just strings.
Personally I avoid this kind of extra attribute; class is a pretty good catch-all for most needs of this kind. I know you can make them valid HTML by extending the DTD, but that seems like a lot of extra work for not much gain. Chris On 3/1/07, Karl Rudd <[EMAIL PROTECTED]> wrote:
I believe so. As I said an "expando" attribute is basically any non-standard attribute that gets added to an element (doesn't matter how). As Klaus notes, the memory leakage is only a problem in IE when the attribute references other DOM elements (directly, or indirectly via closures). Karl Rudd On 3/1/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > so any non standard attribute accessed simple as object.hello is an > expando? no matter if you call getAttribute or not?? > > > > On 2/28/07, Karl Rudd <[EMAIL PROTECTED]> wrote: > > Err no, actually "expandos" refers to "non-standard" attributes that > > get added to DOM elements. They "expand" the attributes that are > > available on an element. > > > > For instance adding an "expando" attribute called "hello": > > > > <input type="submit" value="blah" hello="Hello world!"> > > > > Because they're "non-standard" they can cause memory leak problems > > under Internet Explorer if they refer to other DOM elements. > > > > More info here: > > > > http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/expando.asp > > > > Karl Rudd > > > > On 3/1/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > > > Fil, did you ever get a definition of "DOM 0 expandos"... > > > > > > they're the shortcuts that were provided with dom level 0, that are > > > short cuts for certain html(only) attributes, and collections of dom > > > nodes. > > > > > > like > > > > > > a.href is an 'expando' whereas a. a.getAttribute('href') is not. > > > > > > and > > > > > > document.forms is an expando whereas a.getElementsbyTagname('form') is not. > > > > > > > > > I'm pretty sure thats what it means! > > > > > > bonne chance! > > > > > > On 2/28/07, Fil <[EMAIL PROTECTED]> wrote: > > > > > * Changed: Events are now internally stored in elem.$events rather > > > > > than elem.events (due to a nasty bug relating to DOM 0 expandos). > > > > > > > > I'm translating this blog into French, but I can't figure how to translate > > > > this sentence. "DOM 0 expandos" ? > > > > > > > > Anyway this is available at http://www.jquery.info/spip.php?article42 > > > > > > > > -- Fil > > > > > > > > > > > > _______________________________________________ > > > > jQuery mailing list > > > > discuss@jquery.com > > > > http://jquery.com/discuss/ > > > > > > > > > > > > > -- > > > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > > > _______________________________________________ > > > jQuery mailing list > > > discuss@jquery.com > > > http://jquery.com/discuss/ > > > > > _______________________________________________ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > > -- > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
-- Chris Ovenden http://thepeer.blogspot.com "Imagine all the people / Sharing all the world"
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/