> > NodeLists are live, though, aren't > > they?http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-...... > > Of course, but our selector implementation turns them into an array.
Ah, okay, sorry about that. I was thinking live. I've read http://github.com/kangax/prototype/tree/master/src/element.js now and see where you're coming from. Should have done that earlier. So if I'm using Prototype without enabling automatic extension, I can use $$() to get an array of unextended elements and do whatever I want (e.g., I know it's going to be a big list and don't want them extended until/unless I actually use them). If I use $$W(), I'll get the new Prototype.NodeList with all of the elements pre-wrapped. Is that the idea going forward? -- T.J. :-) On Aug 22, 1:15 pm, kangax <[EMAIL PROTECTED]> wrote: > On Aug 22, 7:14 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote: > > > > This made me think about lazy initialization of NodeListWrapper's. The > > > two options seem to be: > > > 1) store an array of "pure" elements and turn them into wrappers "on > > > the fly" > > > 2) turn elements into wrappers when instantiating `NodeListWrapper` > > > and then return these (already "prepared") wrappers. > > > > I'm in favor of putting all the hard work on constructor (#2)... > > > NodeLists are live, though, aren't > > they?http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-...... > > Of course, but our selector implementation turns them into an array. > > -- > kangax --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---