title: Applying an Event Handler to a Variable
body: <p>Is there a way to apply an event handler to a variable, or does it need to be done with hidden inputs and the like?  I've got a variable being set:</p>
  
  <pre><code>var c = document.getElementById('myCanvas');
  c.myVar = 17;
  </code></pre>
  
  <p>And I'd like to set up an event handler for it in case it ever changes, saving a superfluous hidden input being created and changed and just generally streamlining my code.</p>
  
  <p>Thanks!</p>