setAttribute(attributeName, attributeValue) {
    if (this.doc !== null) {
      transact(this.doc, transaction => {
        typeMapSet(transaction, this, attributeName, attributeValue);
      });
    } else {
      /** @type {Array<function>} */
      this._pending.push(() => this.setAttribute(attributeName, attributeValue));
    }
  }
Sets or updates an attribute.

@note Xml-Text nodes don't have attributes. You can use this feature to assign properties to complete text-blocks.

@param {String} attributeName The attribute name that is to be set.
@param {any} attributeValue The attribute value that is to be set.

@public