title: How expensive is it to set/read the disabled property in HTML form fields?
body: <p>I am working on an application which has a lot of validations in the form:</p>
  
  <pre><code>...
  // oversimplified and abstracted away from the real code
  disableField: function() {
      var disable = this.canDisableField();
      if (this._wasDisabled != disable) {
          this.field.setDisabled(disable);
          this._wasDisabled = disable;
      }
      ...
  },
  
  ...
  </code></pre>
  
  <p>I understand what it's doing is preventing the field (which ends up being an HTML button) to be disabled again and again if it's already disabled.</p>
  
  <p>My question is, is it reading and seting the disabled property on HTML form fields really expensive operations? and, do the cost really compensates the extra code for preventing them?</p>
  
  <p>I know that touching the DOM always has a cost, but today I had to do some hard debugging just to find out that these kinds of validations were injecting problems in the subclasses, I would never have found the problem if I hadn't had access to the base class code.</p>