Use containerMenu as a base for HintMenu instead of regular menu

Change-Id: Ic1ed2e216a9c61aabf1f1cac41972b1a4e96a91a
diff --git a/dev/demo/containermenudemo.js b/dev/demo/containermenudemo.js
index e3b0f99..f1f66c0 100644
--- a/dev/demo/containermenudemo.js
+++ b/dev/demo/containermenudemo.js
@@ -24,8 +24,9 @@
     },
 
     // enter or click
-    onclick : function () {
+    onclick : function (event) {
       console.log(this._name);
+      event.halt();
     },
 
     // right arrow
@@ -56,6 +57,7 @@
         .upgradeTo(this);
         //._init();
       obj.value="";
+      obj.defaultTextValue = "CI";
       return obj;
     },
     add : function (letter) {
@@ -67,25 +69,18 @@
     further : function () {
       this.value = this.value + this.value;
     },
+    isSelectable : function () {
+      return (this.value !== "");
+    },
+    chop : function () {
+      console.log("chop");
+      console.log(this.content(this.value));
+    },
     onclick : function () {
-      console.log('ContainerItem' + this.value);
+      console.log('ContainerItem ' + this.value);
       console.log(this._i);
       this._menu.limit(this._i);
       this._menu.show();
-    },
-    element : function () {
-      // already defined
-      if (this._el !== undefined) return this._el;
-      
-      // Create list item
-      const li = document.createElement("li");
-      li.innerHTML="CI";
-  
-      // Connect action
-      if (this["onclick"] !== undefined) {
-        li["onclick"] = this.onclick.bind(this);
-      };    
-      return this._el = li;
     }
   };
   //List of items.
@@ -100,6 +95,7 @@
   ExampleItemList[2]._i=5;
   ExampleItemList[2].onclick = function (e) {
     this._menu.container().removeItemByIndex(3);
+    //Should fail, that's ok. You can also try index 0 for testing functionality.
   };
 
   //Own container class.
@@ -224,6 +220,8 @@
   document.getElementById('menu').appendChild(menu.element());
   //document.getElementById('largemenu').appendChild(largeMenu.element());
 
+  menu.container().addItem({ value : "Dynamically added", defaultTextValue : "dynamic", _i : 5})
+
   menu.limit(3).show(3);
   menu.focus();