tmpvar/jsdom — Issue #371: Should outerHTML be formatting?
Author: imakewebthings
Created: 2011-11-27 13:23:07+00:00
State: open

`innerHTML` is passing `true` for the `noformat` parameter in `domToString`. `outerHTML` [is not](https://github.com/tmpvar/jsdom/blob/master/lib/jsdom/browser/index.js#L384). This has the adverse effect of adding unwanted whitespace to `pre` elements. The following:

```html

var x = 0;
x++;

```
...gets turned into:

```html

var x = 0;
x++;

```

Is there a reason, spec or otherwise, that `outerHTML` doesn't also force a `noformat`?