Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save FlameWolf/000b14312bb83ab1628ab0b80007eff0 to your computer and use it in GitHub Desktop.
Save FlameWolf/000b14312bb83ab1628ab0b80007eff0 to your computer and use it in GitHub Desktop.
Performance difference between insertAdjacentHTML and appendChild

Element.prototype.insertAdjacentHTML can be up to 4 times slower than Node.prototype.appendChild. So use the latter wherever possible for best performance. (See comment from @frankbakulov below!)

@FlameWolf
Copy link
Author

Yep, seems things have changed since I posted this. Will update, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment