Last active
September 16, 2015 23:12
-
-
Save edysegura/714a2555ddc524b4f6c2 to your computer and use it in GitHub Desktop.
[JS] How to extend the HTML DOM?
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
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