ker/mod/wdg.js
function() {
    var i, arg;
    for (i = 0 ; i < arguments.length ; i++) {
      arg = arguments[i];
      if (typeof arg === 'number') arg = "" + arg;
      if (typeof arg === 'undefined' || typeof arg === 'null'
          || (typeof arg !== 'object' && typeof arg !== 'string')) {
        console.error("[Widget.append] Argument #" + i + " is invalid!", arguments);
        console.error("[Widget.append] Is type is: " + (typeof arg));
        continue;
      };
      if (typeof arg === 'string') {
        if (arg.length < 1) arg = " ";
        arg = window.document.createTextNode(arg);
        if (!arg) {
          console.error(
            "[Widget.append] Unable to create a text node with this text: ", arg
          );
          console.error("[wdg] arguments=...", arguments);
          throw Error(
            "[Widget.append] Unable to create a text node with this text: "
              + JSON.stringify(arg)
          );
        }
      }
      if (Array.isArray(arg)) {
        arg.forEach(
          function(item) {
            this.append(item);
          }, this
        );
      }
      else {
        var e = arg;
        if( !(e instanceof Node) ) {
          if( e.$ instanceof Node ) e = e.$;
          else if( typeof e.element === 'function' ) e = e.element();
          else if( e.element ) e = e.element;
        }
        this._element.appendChild(e);
      }
    }
    return this;
  }
function() {
    var i, arg;
    for (i = 0 ; i < arguments.length ; i++) {
      arg = arguments[i];
      if (typeof arg === 'number') arg = "" + arg;
      if (typeof arg === 'undefined' || typeof arg === 'null'
          || (typeof arg !== 'object' && typeof arg !== 'string')) {
        console.error("[Widget.append] Argument #" + i + " is invalid!", arguments);
        console.error("[Widget.append] Is type is: " + (typeof arg));
        continue;
      };
      if (typeof arg === 'string') {
        if (arg.length < 1) arg = " ";
        arg = window.document.createTextNode(arg);
        if (!arg) {
          console.error(
            "[Widget.append] Unable to create a text node with this text: ", arg
          );
          console.error("[wdg] arguments=...", arguments);
          throw Error(
            "[Widget.append] Unable to create a text node with this text: "
              + JSON.stringify(arg)
          );
        }
      }
      if (Array.isArray(arg)) {
        arg.forEach(
          function(item) {
            this.append(item);
          }, this
        );
      }
      else {
        var e = arg;
        if( !(e instanceof Node) ) {
          if( e.$ instanceof Node ) e = e.$;
          else if( typeof e.element === 'function' ) e = e.element();
          else if( e.element ) e = e.element;
        }
        this._element.appendChild(e);
      }
    }
    return this;
  }
function ( ) { var i , arg ; for ( i = 0 ; i < arguments . length ; i ++ ) { arg = arguments [ i ] ; if ( typeof arg === 'number' ) arg = "" + arg ; if ( typeof arg === 'undefined' || typeof arg === 'null' || ( typeof arg !== 'object' && typeof arg !== 'string' ) ) { console . error ( "[Widget.append] Argument #" + i + " is invalid!" , arguments ) ; console . error ( "[Widget.append] Is type is: " + ( typeof arg ) ) ; continue ; } ; if ( typeof arg === 'string' ) { if ( arg . length < 1 ) arg = " " ; arg = window . document . createTextNode ( arg ) ; if ( ! arg ) { console . error ( "[Widget.append] Unable to create a text node with this text: " , arg ) ; console . error ( "[wdg] arguments=..." , arguments ) ; throw Error ( "[Widget.append] Unable to create a text node with this text: " + JSON . stringify ( arg ) ) ; } } if ( Array . isArray ( arg ) ) { arg . forEach ( function ( item ) { this . append ( item ) ; } , this ) ; } else { var e = arg ; if ( ! ( e instanceof Node ) ) { if ( e . $ instanceof Node ) e = e . $ ; else if ( typeof e . element === 'function' ) e = e . element ( ) ; else if ( e . element ) e = e . element ; } this . _element . appendChild ( e ) ; } } return this ; }
Append children to this widget.
Append children to this widget .