createElement(tagName, ...args) {
    const element = this.#global.createElement(tagName)
    const isVirtualGlobal = this.#global instanceof VirtualDocument

    let children = []
    let argumentID = 0

    for (const argument of args) {
      argumentID += 1

      if (typeof argument === 'string' || typeof argument === 'number') {
        // In case of a string, it is the Text content of the node

        element.textContent = argument
      } else if (argument instanceof Function) {
        // TODO: I don't remember why I made this functionality and what it does
        const propertyName = 'propertyName'
        const bindFunction = argument

        this.#subscribeToBindings({ element, propertyName, bindFunction })

        element[propertyName] = bindFunction(element)
      } else if (
        (isVirtualGlobal && argument instanceof VirtualElement)
        || (!isVirtualGlobal && argument instanceof Node)
      ) {
        // If Node, this is a child (created by this function) to be appended to its parent

        children.push(argument)
      } else if (argument instanceof Array) {
        // If Array, it contains children to be added to their parent

        children = addChildrenToStack(argument, children)
      } else if (argument instanceof Error) {
        // Error message

        element.textContent = argument
      } else if (argument instanceof Object && argumentID === 1) {
        // If Object and first argument, this is a property
        // ! This condition needs to be at the end of the 'if' chain

        this.#setPropertiesToElement(element, argument)
      }
    }

    appendChildrenToElement(element, children)

    if (children.length >= 0) {
      const elcLevel = this.#collectedElements.length - 1

      this.#collectedElements[elcLevel].removeTheseElements(children)
      this.#collectedElements[elcLevel].addElement(element)
    }

    return element
  }
/**
   * Create HTML element
   *
   * @param {string} tagName
   * @param {*} args
   * Different variants are possible:<br>
   * - String value - It will be textContent of the element. Use this in div tags and similar.
   * - Object value - For all the properties of the element, like "id", "class" and so on...
   * - Element (multiple arguments) - For other calls of this same function (creating children)
   * - Array - Alternative for creating children
   * @returns {TheElement}
   */
Create HTML element
@param {string} tagName
@param {*} args
Different variants are possible:
- String value - It will be textContent of the element. Use this in div tags and similar.
Create HTML element @param { string } tagName @param { * } args Different variants are possible : - String value - It will be textContent of the element . Use this in div tags and similar .
createElement(tagName, ...args) {
    const element = this.#global.createElement(tagName)
    const isVirtualGlobal = this.#global instanceof VirtualDocument
    let children = []
    let argumentID = 0
    for (const argument of args) {
      argumentID += 1
      if (typeof argument === 'string' || typeof argument === 'number') {
        element.textContent = argument
      } else if (argument instanceof Function) {
        const propertyName = 'propertyName'
        const bindFunction = argument
        this.#subscribeToBindings({ element, propertyName, bindFunction })
        element[propertyName] = bindFunction(element)
      } else if (
        (isVirtualGlobal && argument instanceof VirtualElement)
        || (!isVirtualGlobal && argument instanceof Node)
      ) {
        children.push(argument)
      } else if (argument instanceof Array) {
        children = addChildrenToStack(argument, children)
      } else if (argument instanceof Error) {
        element.textContent = argument
      } else if (argument instanceof Object && argumentID === 1) {
        this.#setPropertiesToElement(element, argument)
      }
    }
    appendChildrenToElement(element, children)
    if (children.length >= 0) {
      const elcLevel = this.#collectedElements.length - 1
      this.#collectedElements[elcLevel].removeTheseElements(children)
      this.#collectedElements[elcLevel].addElement(element)
    }
    return element
  }
createElement ( tagName , ... args ) { const element = this . #global . createElement ( tagName ) const isVirtualGlobal = this . #global instanceof VirtualDocument let children = [ ] let argumentID = 0 for ( const argument of args ) { argumentID += 1 if ( typeof argument === 'string' || typeof argument === 'number' ) { element . textContent = argument } else if ( argument instanceof Function ) { const propertyName = 'propertyName' const bindFunction = argument this . #subscribeToBindings ( { element , propertyName , bindFunction } ) element [ propertyName ] = bindFunction ( element ) } else if ( ( isVirtualGlobal && argument instanceof VirtualElement ) || ( ! isVirtualGlobal && argument instanceof Node ) ) { children . push ( argument ) } else if ( argument instanceof Array ) { children = addChildrenToStack ( argument , children ) } else if ( argument instanceof Error ) { element . textContent = argument } else if ( argument instanceof Object && argumentID === 1 ) { this . #setPropertiesToElement ( element , argument ) } } appendChildrenToElement ( element , children ) if ( children . length >= 0 ) { const elcLevel = this . #collectedElements . length - 1 this . #collectedElements [ elcLevel ] . removeTheseElements ( children ) this . #collectedElements [ elcLevel ] . addElement ( element ) } return element }
Create HTML element
 @param {string} tagName
 @param {*} args
 Different variants are possible:<br>
 - String value - It will be textContent of the element.
Create HTML element @param { string } tagName @param { * } args Different variants are possible : <br > - String value - It will be textContent of the element .
// In case of a string, it is the Text content of the node // TODO: I don't remember why I made this functionality and what it does // If Node, this is a child (created by this function) to be appended to its parent // If Array, it contains children to be added to their parent // Error message // If Object and first argument, this is a property // ! This condition needs to be at the end of the 'if' chain