1

Is there any way to get outerHTML of element respecting oryginal indentation (or adding proper (new line and tab chars) basing on DOM tree?

so mydiv.outerHTML appended to <pre> element would look good (at the moment it would be like 1 long line of code - especially when element was created by js functions, not written with html)

Adam Pietrasiak
  • 12,773
  • 9
  • 78
  • 91

0 Answers0