Permalink
Browse files

Merge commit '1de5640a4ab678d6c2e7'

  • Loading branch information...
2 parents abaa9e3 + 1de5640 commit 5cedf7b6c5337a26f898a503450370e1b1bc0b01 @tmpvar committed Sep 8, 2010
Showing with 7 additions and 4 deletions.
  1. +6 −3 lib/jsdom/browser/domtohtml.js
  2. +1 −1 lib/jsdom/browser/index.js
@@ -166,7 +166,7 @@ var generateHtmlRecursive = function(element) {
return ret;
};
-exports.domToHtml = function(dom){
+exports.domToHtml = function(dom, noformat) {
var ret = "";
if(dom.item){
@@ -180,7 +180,10 @@ exports.domToHtml = function(dom){
// single node
ret = generateHtmlRecursive(dom);
}
-
- return formatHTML(ret);
+ if (noformat) {
+ return ret;
+ } else {
+ return formatHTML(ret);
+ }
}
@@ -232,7 +232,7 @@ var browserAugmentation = exports.browserAugmentation = function(dom, options) {
});
dom.Element.prototype.__defineGetter__('innerHTML', function() {
- return domToHtml(this.childNodes);
+ return domToHtml(this.childNodes, true);
});
dom.Element.prototype.__defineSetter__('innerHTML', function(html) {
//Check for lib first

0 comments on commit 5cedf7b

Please sign in to comment.