Is it possible to set iframe with data src inner document.domain?
<p>There is an iframe with plain HTML src </p>

<pre><code>&lt;iframe id="myIframe"&gt;&lt;/iframe&gt;

&lt;script&gt;
$.ajax({
    url: url,
    type: 'GET',
    success: function(data) {
        $('#myIframe').attr('src', 'data:text/html;charset=utf-8,' + data);
    }
});
&lt;/script&gt;
</code></pre>

<p>If to check document.domain of iframe, then it will have value of '' or null.</p>

<p>I want to put document.domain to iframe.</p>

<p>Why do I want to put document.domain? In response HTML data there is angular2 app, which uses SystemJS to import config. It checks for origin and finds that it origin of iframe is different. As a result - exception.</p>

<p>Please correct me if I am wrong.</p>

<p>Thanks!</p>

<p>*The reason I use ajax to set iframe src is that I need to set custom headers in request to iframe src url.</p>