Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save FlameWolf/b2f82c071d7a1b3ca46c5e7467806233 to your computer and use it in GitHub Desktop.
Save FlameWolf/b2f82c071d7a1b3ca46c5e7467806233 to your computer and use it in GitHub Desktop.
Element.prototype.replaceWith = function(html) { this.insertAdjacentHTML("afterend", html); this.remove(); };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment