You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/07/15 02:42:02 UTC
svn commit: r422117 -
/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/html.js
Author: jkuhnert
Date: Fri Jul 14 17:42:02 2006
New Revision: 422117
URL: http://svn.apache.org/viewvc?rev=422117&view=rev
Log:
Noticed typo
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/html.js
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/html.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/html.js?rev=422117&r1=422116&r2=422117&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/html.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/html.js Fri Jul 14 17:42:02 2006
@@ -36,7 +36,7 @@
switch (node.childNodes[i].nodeType) {
case 1: // ELEMENT_NODE
case 5: // ENTITY_REFERENCE_NODE
- s += tacos.getElementAsStringGeneric(node.childNodes[i]);
+ s += this.getElementAsStringGeneric(node.childNodes[i]);
break;
case 3: // TEXT_NODE
case 2: // ATTRIBUTE_NODE
@@ -48,5 +48,25 @@
}
}
return s;
- }
+ },
+
+ getElementAsStringGeneric:function(node){
+ if (!node) { return ""; }
+
+ var s='<' + node.nodeName;
+ // add attributes
+ if (node.attributes && node.attributes.length>0) {
+ for (var i = 0; i < node.attributes.length; i++) {
+ s += " " + node.attributes[i].name
+ + "=\"" + node.attributes[i].value + "\"";
+ }
+ }
+ // close start tag
+ s += '>';
+ // content of tag
+ s += this.getContentAsStringGeneric(node);
+ // end tag
+ s += '</' + thisNode.nodeName + '>';
+ return s;
+ }
}