toXml(element) {
    element.setAttribute('value', this.getValue());
    return element;
  }
Saves the state of the field as XML.
@param {!Element} element The element to add the state to.
@returns {!Element} The element with the state added.