code: function buildElement( def, code, _varName ) {
      const varName = getVarName( def, _varName );
      addUnique( code.elementNames, varName );
      try {
          const type = def[ 0 ];
          if ( RX_TAG_NAME.test( type ) ) {
              buildElementTag( def, code, varName );
              return buildElement_tagChildren( def, code, varName );
          }
          if ( RX_CLS_NAME.test( type ) ) {
              buildElementCls( def, code, varName );
          } else {
              throw Error( "Unknown element name: " + JSON.stringify( type ) + "!\n" +
                  "Names must have one of theses syntaxes: " +
                  JSON.stringify( RX_TAG_NAME.toString() ) +
                  " or " + JSON.stringify( RX_CLS_NAME.toString() ) + ".\n" +
                  JSON.stringify( def ) );
          }
          return varName;
      } catch ( ex ) {
          throw Error( `${ex}\n...in buildElement - element "${varName}": ${limitJson( def )}` );
      } finally {
          // Store the variable for use in code behind.
          const id = def[ "view.id" ];
          if ( typeof id === 'string' ) {
              code.section.elements.define
                  .push( `this.$elements.${camelCase( id )} = ${varName};` );
          }
      }
  }
docs: An element can be a tag (`{DIV...}`) or a view (`{tfw.view.button...}`).
  
  @param   {object} def - Something like `{tfw.view.button ...}`.
  @param   {Template} code - Helping stuff for code generation.
  @param   {string} _varName - Name of the variable holding this element in the end.
  @returns {undefined}