Am 04.01.2007 um 13:19 schrieb Colin Mollenhour:
On 2), why can't the escapeHTML function create a div node and a
text node once one the first call and reuse it on subsequent
calls? Also, is this not a leak?
------------For reference---------
escapeHTML: function() {
var div = document.createElement('div');
var text = document.createTextNode(this);
div.appendChild(text);
return div.innerHTML;
},
----------------------------------
That's something we'd need to measure. The text node creation
wouldn't go away, and reusing the div node would mean to empty it out
before adding the text node. I don't really think that it would make
a real difference.
Best,
Thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---