constructor (editor, params) {
    /** @type {./treemode} */
    this.editor = editor
    this.dom = {}
    this.expanded = false

    if (params && (params instanceof Object)) {
      this.setField(params.field, params.fieldEditable)
      if ('value' in params) {
        this.setValue(params.value, params.type)
      }
      if ('internalValue' in params) {
        this.setInternalValue(params.internalValue)
      }
    } else {
      this.setField('')
      this.setValue(null)
    }

    this._debouncedOnChangeValue = debounce(this._onChangeValue.bind(this), Node.prototype.DEBOUNCE_INTERVAL)
    this._debouncedOnChangeField = debounce(this._onChangeField.bind(this), Node.prototype.DEBOUNCE_INTERVAL)

    // starting value for visible children
    this.visibleChilds = this.getMaxVisibleChilds()
  }
@constructor Node
Create a new Node
@param {./treemode} editor
@param {Object} [params] Can contain parameters:
                         {string}  field
                         {boolean} fieldEditable
                         {*}       value
                         {String}  type  Can have values 'auto', 'array',
                                         'object', or 'string'.