Skip to content

Instantly share code, notes, and snippets.

@edysegura
Last active September 16, 2015 23:12
Show Gist options
  • Save edysegura/714a2555ddc524b4f6c2 to your computer and use it in GitHub Desktop.
Save edysegura/714a2555ddc524b4f6c2 to your computer and use it in GitHub Desktop.
[JS] How to extend the HTML DOM?
HTMLElement.prototype.remove = function() {
this.parentNode.removeChild(this);
};
document.querySelector("#a").remove();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment