Make upgradeTo an object prototype

Change-Id: Ibdedbc5a57215151f97c5903ac69ba3ce6bab10c
diff --git a/dev/js/src/container/container.js b/dev/js/src/container/container.js
index 9b436ca..60bc0d9 100644
--- a/dev/js/src/container/container.js
+++ b/dev/js/src/container/container.js
@@ -54,18 +54,6 @@
 
 
     },
-    /**
-     * Upgrade this object to another object,
-     * while private data stays intact.
-     *
-    * @param {Object} An object with properties.
-    */
-    upgradeTo : function (props) {
-      for (let prop in props) {
-        this[prop] = props[prop];
-      };
-      return this;
-    },
 
     addItem : function (item) {
       var cItem = this._containerItemClass.create().upgradeTo(item);
@@ -227,4 +215,4 @@
     }
 
 };
-});
\ No newline at end of file
+});