Created
October 13, 2016 06:54
-
-
Save argyleink/9ca48950a018d878f8591d9977dd4d06 to your computer and use it in GitHub Desktop.
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
const el = function(options) { | |
let node = document.createElement(options.type || 'div') | |
if (options.id) node.id = options.id | |
if (options.class) node.className = options.class | |
if (options.text) node.textContent = options.text | |
if (options.html) node.innerHTML = options.html | |
return node | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment