code: function (Cptfn) {
          if (!Cptfn || Cptfn.constructor !== Function) {
              log.error("[CptWrapper] Invalid Component constructor!");
          } else {
              this.cpt = new Cptfn();
              this.nodeInstance = null; // reference to set the node instance adirty when an attribute changes
              this.root=null; // reference to the root template node
              this.initialized = false;
              this.needsRefresh = true;
  
              // update attribute values for simpler processing
              var atts = this.cpt.$attributes, att, bnd;
              if (atts) {
                  for (var k in atts) {
                      att = atts[k];
                      if (k.match(/^on/)) {
                          // this is a callback
                          if (!att.type) {
                              log.error("Attribute type 'callback' should be set to '" + k + "'");
                          } else if (att.type !== "callback") {
                              log.error("Attribute type 'callback' should be set to '" + k + "' instead of: "
                                      + att.type);
                              att.type = "callback";
                          }
                          continue;
                      }
  
                      bnd = att.binding;
                      // set the internal _binding value 0=none 1=1-way 2=2-way
                      if (bnd) {
                          bnd = BINDING_VALUES[bnd];
                          if (bnd !== undefined) {
                              att._binding = bnd;
                          } else {
                              log.error("Invalid attribute binding value: " + att.binding);
                              att._binding = 0;
                          }
                      } else {
                          att._binding = 0;
                      }
  
                      // check type
                      if (att.type) {
                          if (att.type === "callback") {
                              log.error("Attribute of type 'callback' must start with 'on' - please rename: " + k);
                          } else if (ATTRIBUTE_TYPES[att.type] === undefined) {
                              log.error("Invalid attribute type: " + att.type);
                              att.type = 'string';
                          }
                      } else {
                          att.type = 'string';
                      }
                  }
              }
          }
      }
docs: Observer constructor.
  @param Cptfn {Function} the component constructor