Created
May 16, 2013 08:51
-
-
Save edigu/5590355 to your computer and use it in GitHub Desktop.
Amazing legacy bug in Google Chrome!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var elem = document.getElementById('any-element-id'); | |
elem.innerHTML = '<table class="bar">' + "A text "; | |
elem.innerHTML += "Another textual string"; | |
elem.innerHTML += '</table>'; | |
// Produces : "A text <table class="bar"></table>Another textual string</table>" | |
// Expected : "<table class="bar">A text Another textual string</table>" | |
// http://webdesignpatterns.org/pattern/amazing-legacy-bug-google-chrome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment