John, I had a quick look into data. Basically a simple improvement could be at line 38 of data.js
#38 elem[ expando ] = id; should probably be #38 elem[ expando ] = new Number(id); This will simply avoid dirty string element representation in IE (try with outerHTML or parent innerHTML) but the reference will be there and it will be a number. I think it's worthy, the rest of the proxy is almost there (except jQuery data does more checks) Apologize I could not post a patch but I am in a temporary PC till tomorrow ... Best Regards On Sat, Oct 17, 2009 at 3:40 AM, John Resig <jere...@gmail.com> wrote: > > > Of course, although it would simplify the $.data() implementation > > (speed performances too) it would breaks compatibility with many > > existent plugins. However, $.data() in 1.4 will breaks it already... > > If developers want to switch to this style they're absolutely welcome > to (in fact, we already have in jQuery core for performance > advantages, in a number of places). > > I've done a quick search on Google Code Search and have only found a > couple places where jQuery.data(elem) is used (outside of jQuery > itself). Right now I'm leaning towards keeping the API change > (especially since the alternative would be pretty lame - like doing > jQuery.data(elem, true) or some such) but if the change is too bad > then we can always reconsider. > > I should note that in jQuery 1.4 you can do $(elem).data() to get at > the element's data, no problem (there was no API conflict for that > method). > > --John > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---