How does one validate html that's generated from JS running in the browser?
- by Henry Rose
The page in question has very skeletal html sent over the wire to facilitate the building of a complicated UI in javascript.
I'm now encountering a strange browser compatibility issue that feels very much like I've got a markup problem somewhere on the page.
I've validated the page as it comes across the wire using the W3C tool and ensured there are no issues in that html. I've also tried validating the output of running on the browser console:
document.getElementsByTagName('html')[0].outerHTML
I find that the output of the above introduces lots of new issues, such as removing the trailing '/' in self closing tags. This added noise is distracting, but it also makes me uneasy about validating this method.
How do you validate markup that's rendered client side?