Created
July 31, 2014 14:30
-
-
Save lotsofcode/93ec612fb2b8bb4801c6 to your computer and use it in GitHub Desktop.
JavaScript implementation of "prependChild"
This file contains hidden or 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
Element.prototype.prependChild = function(newElement) { | |
return this.insertBefore(newElement, this.firstChild); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment