Skip to content

Commit

Permalink
Show contents of text nodes in jsDump.node. Fixes #380.
Browse files Browse the repository at this point in the history
Follows-up 4c7c688.
  • Loading branch information
Krinkle committed Dec 20, 2012
1 parent 476fb66 commit 3e613f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion qunit/qunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,14 @@ QUnit.jsDump = (function() {
ret += " " + a + "=" + QUnit.jsDump.parse( val, "attribute" );
}
}
return ret + close + open + "/" + tag + close;
ret += close;

// Show content of TextNode or CDATASection
if ( node.nodeType === 3 || node.nodeType === 4 ) {
ret += node.nodeValue;
}

return ret + open + "/" + tag + close;
},
// function calls it internally, it's the arguments part of the function
functionArgs: function( fn ) {
Expand Down

0 comments on commit 3e613f0

Please sign in to comment.