Posts

Showing posts with the label Internet Epxlorer

Drip under control via another IE memory leak tentative ...

Apparently, using this strategy I can obtain a flat line in Drip monitor: // function used to remove a node, every attached // attribute and every nested node via the same procedure var destroy = (function(destroy){ // WebReflection IE leaks attemp! function $destroy(node){ while(node.lastChild) destroy(node.lastChild); if(node.parentNode) node.parentNode.removeChild(node); }; return destroy = destroy.clearAttributes ? function(node){ if(node.clearAttributes) // Hedger suggestion node.clearAttributes(); $destroy(node); } : $destroy ; })(document.createElement("script")); // used to remove everything function destroyAll(){ destroy(document.documentElement); }; // used to avoid leaks when the page is refreshed // or the url is changed if(this.attachEvent) attachEvent("onunload", destroyAll); reasonable performances and apparently a relia...

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...

vice-versa project, a philosophy rather than a library

Array.forEach(document.all, function(node, i, all){ // vice-versa project }); well, there are few things I can say here, and first one is: please, if interested, help me! The second one is my vision, a web where rather than criticisms, there is more collaboration to obtain good overall performances improving code quality. This is not my old JSL project, this is a new groove, a new project, a non library , something I hope you will all appreciate. But, if not, I am here to discuss about it :) vice-versa project Have fun with Web Development! Update Implemented a TaskSpeed test file for vice-versa project. Here first results ordered by average. browser Pure vice Moo qoox dojo YUI AVG Dom versa Tools doo -------------------------------------------------------------------- Safari 4 198 114 392 205 246 410 260.83 Chrome 1 251 273 589 279 336 692 403.33 Opera 10 215 206 764...