I want to make a huge table using Prototype.  my script has 2900 calls
to Element.update. These calls lasts 4 seconds, which is a lot.  This
is mainly taken up by the regular expressions in the function, to
identify scripts inside the body I want to insert in the node.  By
just removing these script-related code out of the update-function, I
have a huge performance boost.

I don't want to customize my local prototype.js file, but want to
override the function.  I tried something like this:

Element.Methods.update = function(element, content) {
    element = $(element);
    if (content && content.toElement) content = content.toElement();
    if (Object.isElement(content)) return element.update().insert
    content = Object.toHTML(content);
    element.innerHTML = content;
//    element.innerHTML = content.stripScripts();
//    content.evalScripts.bind(content).defer();
    return element;

This didn't change my method.

Adding a new method
Element.Methods.simpleUpdate = function(element, content) {
Object.extend(Element, {
simpleUpdate: function(element, content) {

doesn't work either.

How can I get it work, or is there an alternative in which I don't
have to use the update-function, besides updating it by changing the
innerHTML property myself.

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to