title: Get ember component (SVG) parent element width and height
body: <p>I am trying to create an SVG wrapper using components. My app will allow users to render different SVGs from a list. </p>
  
  <p>I would like those SVG to fit the screen; so I thought that I would get the DOM parent element width and height, before the component get inserted on the screen.</p>
  
  <p>To do so here is the code I tried. It seems that the issue is related to the SVG because when the <code>tagName</code> is set to <code>span</code> or even not set; things works as expected.</p>
  
  <pre><code>import Ember from 'ember';
  
  export default Ember.Component.extend({
    tagName: 'svg',
    attributeBindings: ['height', 'width', 'viewBox', 'xmlns', 'version'],
    width: getParentWidth(),
  
    getParentWidth: function() {
      return this.$().parent().width();
    }
  });
  </code></pre>
  
  <p>Thanks for your help</p>