The UID is stored as a property of the element to associate it with the global storage where all other properties .store()ed on the element are saved. Numbers and strings appear in the html representation of the Element in IE, for example they would show up in innerHTML of parent elements. That's why the UID of Elements is an array.

On 31. Mar, 2009, at 17:29, joseanpg wrote:


Hello, I have a question about the storage module in MooTools 1.2.1.
We can see

var $uid = (Browser.Engine.trident) ? function(item){
       return (item.uid || (item.uid = [Native.UID++]))[0];
} : function(item){

       return item.uid || (item.uid = Native.UID++);

};

Why is the array necessary for Trident branch?

--
Jan - MooTools comitter
twitter/blog: http://kassens.net

Reply via email to