code: function (x, attributes) {
    runtime.assertBrowser()
  
    if (x) {
      if (typeof x === 'string') {
        // create element
        var tagSearch = elementStringRegex.exec(x)
        var tag = tagSearch ? tagSearch[1] : null
        if (tag) {
          return addElement(tag, attributes)
        } else {
          throw 'Only basic tags like "<div>" without attributes are currently supported. (No queries and no HTML strings)'
        }
      } else if (isElement(x)) {
        // only add convenience methods
        extendWithConvenienceMethods(x)
      } else {
        throw 'Please provide html element string (i.e. "<div>") or element object as first argument.'
      }
    }
  }
docs: main