docs: function Serialize (elem) {
    if (!(this instanceof Serialize))
      return new Serialize(elem)
  
    if (!elem || elem.nodeType !== Node.ELEMENT_NODE)
      throw TypeError('Serialize can only serialize element nodes.')
  
    var text = ''
  
    this.length = 0
    this.markups = []
    this.type = elem.nodeName.toLowerCase()
  
    // Automatically update the length when setting the text.
    Object.defineProperty(this, 'text', {
      configurable: true,
      enumerable: true,
      get: function () {
        return text
      },
      set: function (newText) {
        this.length = newText.length
        text = newText
      }
    })
  
    convert(elem, this)
  }