document.documentElement.outerHTML returns a different HTML
I'm trying to make a js app that reads and checks HTML/JS code inserted by the user. I'm using document.[some div].outerHTML to retrieve the full html contained in that element. But, I noticed that IE10 (and other versions of IE) modify HTML returned by .outerHTML property. In particular, it changes the order of parameters of any element. For example: Original code: <a id="test" class="myclass" name="test" href="mylink">link</a> Becames something like: HTML returned by .outerHTML <a name="test" href="mylink" id="test" class="myclass">link</a> As you see, the name and href params are reordered.
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.