title: javascript object prototype properties not updating
body: <p>I am new to javascript so I am having some problem creating an object, then changing it properties afterwards through prototyping.</p>
  
  <p>Here is the code I have:</p>
  
  <pre><code>function test() {
      this.xCssClass = "placeholder";
      this.init = function () {
          var btn = document.createElement("div");
          btn.className = this._CssClass;
          this.Node = btn;
      }
      this.Node;
      this.CreateInterface = function () {
          var btn = document.createElement("div");
          this.Node = btn;
      }
      this.init();
  }
  test.prototype.CssClass = {
      get CssClass() {
          return this._CssClass;
      },
      set CssClass(arg){
          this.xCssClass = arg;
          this.className = "args";
      }
  }
  var x = new test();
  document.body.appendChild(x.Node);
  
  x.xCssClass="GHR"
  Debug.WriteLine(x.xCssClass);
  </code></pre>
  
  <p>When I try to redefine the cssclass it redefines but it doesnt update the object that was added to the Dom.  I want to be able to go: 
  <code>x.xCssClass="some css class"</code>
  and have the x object update in both javascript and the dom.  Right now it is only updating in javascript.  What I am doing wrong?  Am I confusing the instances? Any help would be appreciated.  Thanks</p>