title: Is it possible to manipulate an SVG document embedded in an HTML doc with JavaScript?
body: <p>I have made a SVG image, or more like mini application, for viewing graphs of data. I want to include this in a HTML page, and call methods on the SVG image.</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;object id="img" data="image.svg" width="500" height="300"/&gt;
  &lt;script&gt;document.getElementById("img").addData([1,23,4]);&lt;/script&gt;
  </code></pre>
  
  <p>Is it at all possible to call methods on the SVG document? If so, how do I declare the methods to expose in the SVG file, and how do I call them from the HTML document?</p>