title: Chrome unsafe javascript request when loading YouTube Iframe through plugin
body: <p>I have made a small plugin that I am writing that loads a youtube iframe when an image is clicked. Part of the script centers the loaded youtube iframe in the parent container. This works great in FF and IE, but in Chrome, the proper margins for centering are not returned. I am also getting the "unsafe javascript attempt to access frame with URL" error when in Chrome.</p>
  
  <p>I have the following code to get the dimensions I need:</p>
  
  <pre><code>(function($){
  
  $.fn.vidloader = function(data){
        var $dataObject = $(data); //The Iframe
        var dataHeight = $dataObject.height();
        var dataWidth = $dataObject.width();
  
                //FF and IE return proper height and width, Chrome returns 0;
                //do a bunch of other stuff to process this 
          }
  })
  
       $('#container_one').vidloader('&lt;iframe "my iframe from youtube"&gt;&lt;/iframe&gt;');
  </code></pre>
  
  <p>Is Chrome returning 0 because of the 'unsafe attempt to access frame with URL' error? If so is there anyway I can avoid that error? Or do I just need to use a different method to extract the Iframe style attributes with Chrome?</p>