Created
March 28, 2012 06:29
-
-
Save 0mg/2224241 to your computer and use it in GitHub Desktop.
dom.js
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
var dom = { | |
ce: function ce(s) { return document.createElement(s); }, | |
ct: function ct(s) { return document.createTextNode(s); }, | |
cf: function cf() { return document.createDocumentFragment(); }, | |
id: function id(s) { return document.getElementById(s); }, | |
q: function q(s) { return document.querySelector(s); }, | |
qs: function qs(s) { return document.querySelectorAll(s); }, | |
rm: function rm(e) { return e.parentNode.removeChild(e); } | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment