code: function () {
                  /*  determine parameters  */
                  var params = $cs.params("migrate", arguments, {
                      comps:     { pos: "...", req: true    },
                      sync:      {             def: false   },
                      completed: {             def: $cs.nop }
                  });
  
                  /*  iterate over all components to migrate  */
                  var n = 0;
                  var parent = this;
                  _cs.foreach(params.comps, function (comp) {
                      if (params.sync) {
                          /*  migrate synchronously  */
                          var state_old = comp.state();
                          comp.state({ state: "created", sync: true });
                          comp.detach();
                          comp.attach(parent);
                          comp.state(state_old);
                      }
                      else {
                          /*  migrate asynchronously  */
                          (function (comp, state_old) {
                              comp.state({ state: "created", sync: false, callback: function (/* state_new */) {
                                  this.detach();
                                  this.attach(parent);
                                  this.state({ state: state_old, sync: false, callback: function (/* state_old */) {
                                      n--;
                                      if (n === 0)
                                          params.completed.call(null);
                                  }});
                              }});
                          })(comp, comp.state());
                          n++;
                      }
                  });
              }
docs: /*  migrate a component