Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLObjectElement': Blocked a frame with origin
<p>I am getting this error:</p>

<p>Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLObjectElement': Blocked a frame with origin "<a href="http://localhost:8089" rel="nofollow">http://localhost:8089</a>" from accessing a cross-origin frame.(…) </p>

<p>when i try to access the height and width using content document:</p>

<pre><code>var doc = document.getElementsByTagName("object")[0].contentDocument; 
var size = doc.documentElement.getBoundingClientRect(); 
this._imageW = size.width; 
this._imageH = size.height;
</code></pre>

<p>this works whena a user loads local files from their computer but not remote url.</p>

<p>i tried using jquery:</p>

<pre><code>this._svg.addEventListener('load',function() {
    this._imageW = jQuery(".SVGImage").width();
    this._imageH = jQuery(".SVGImage").height();
     ...
 ...
</code></pre>

<p>it doesnt work on the first load of the image but it works for the second load of the images.</p>

<p>i want a way to access content document for URL inputs (images) how can i access the getBoundingClientRect() method of an svg image loaded as URL?</p>