Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const el = function(options) {
let node = document.createElement(options.type || 'div')
if ( =
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