This runs without errors, but doesn't physically add the button to the page because you never added it to the document. I assume that's the next step.
var System = {
Windows : {
Forms : {
Control : {
TabControl : function ()
{
var self=this;
this.Node = null;
this._ID="id test";
this.TabPages = {
//
Add: function () {
console.log("ADD ID:"+self._ID);
}
};
this.Focus = function () {
this.Node.focus();
};
this.NodeCreate = function () {
console.log("node created");
var btn = document.createElement("button");
btn.type = "button";
btn.name = this._Name;
self.Node = btn;
return self.Node;
}
self.NodeCreate();
return this;
}
}
}
}
},
Button = new System.Windows.Forms.Control.TabControl();
Button.TabPages.Add();