On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Every kit needs library functions like
>
> function setText(node, text) {
> node = $(node);
> clearElement(node);
> node.appendChild(document.createTextNode(text));
> return node;
> };
>
> function clearElement(node) {
> node = $(node);
> while(node.hasChildNodes && node.hasChildNodes())
> node.removeChild(node.firstChild);
> return node;
> };
>
> I do not know if MochiKit has functions that perform this, but you
> should use the Approved DOM Method rather than setting innerHTML
> directly (though it seems this ought to work...)
That isn't even relevant to the question, but MochiKit does that just
fine with appendChildNodes and replaceChildNodes. Strings are
automatically converted into text nodes.
-bob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---