div[expando] = null OR div.removeAttribute(expando)?
Today we had an interesting conversation in the jQuery developer mailing list, and " surprise ", it was about Internet Explorer and memory leaks . I instantly started some test to understand what the hell is going on there ... and I encountered a dilemma which is not simple at all! div.prop = 1 IS NOT div.setAttribute("prop", 1) Some developer thinks that the usage of setProperty and getProperty is basically the same of a manual assignment as generic DOM Element property ... well, they are wrong . First of all, if we are working with XML we all know that it is not possible to assign a property in this way: xmlNode.prop = 123; // Error!!! xmlNode.setAttribute("prop", 123); // OK, but be careful! The main difference between manual property assignment and the usage of setAttribute/getAttribute is that we are changing HTML or XML properties of the node without control . The reason is simple, how manual properties are assigned/retrieved is browser dependent, an...