src/index.js
function ensureDOMElement (input) {
  let domElement = null
  let tmp = null
  if (input instanceof Element) {
    return input
  } else if ('string' == typeof input) {
    tmp = document.createElement('div')
    tmp.innerHTML = input
    domElement = tmp.innerHTML.length ? tmp.children[0] : new Template(input)
  } else {
    domElement = document.createElement('div')
  }
  return domElement
}
function ensureDOMElement (input) {
  let domElement = null
  let tmp = null
  if (input instanceof Element) {
    return input
  } else if ('string' == typeof input) {
    tmp = document.createElement('div')
    tmp.innerHTML = input
    domElement = tmp.innerHTML.length ? tmp.children[0] : new Template(input)
  } else {
    domElement = document.createElement('div')
  }
  return domElement
}
function ensureDOMElement ( input ) { let domElement = null let tmp = null if ( input instanceof Element ) { return input } else if ( 'string' == typeof input ) { tmp = document . createElement ( 'div' ) tmp . innerHTML = input domElement = tmp . innerHTML . length ? tmp . children [ 0 ] : new Template ( input ) } else { domElement = document . createElement ( 'div' ) } return domElement }
Ensure DOM element.

@private
@param {Mixed} input
@return {Element}
Ensure DOM element .