title: Put element in Knockout View Model
body: <p>How can I bind an element so that the element itself is in my view model? I don't want to use <code>document.getElementByID</code>.</p>
  
  <h2>Html</h2>
  
  <pre><code>&lt;div id="someDiv" data-bind="self: someDiv" /&gt;
  </code></pre>
  
  <h2>ViewModel</h2>
  
  <pre><code>viewModel.someDiv = ko.observable();
  </code></pre>
  
  <h2>Example</h2>
  
  <pre><code>(viewModel.someDiv() === document.getElementByID('someDiv')) === true;
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p>Some context... I have subscribed to another view model in a wrapper layer that calls out to a graphing library. I would like to bind the element the graphing library renders to.</p>