<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">13.1.0</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">Windows</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">19042.985</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">test.html should get loaded</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">electron crashes.</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><a href="https://gist.github.com/t57ser/591ace911d2274f5500a702d178d7b96">https://gist.github.com/t57ser/591ace911d2274f5500a702d178d7b96</a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">After example.com gets loaded, open the devtools and type<br>
location = "test://"</p>
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">12.0.2<br>
"electron-packager": "^15.2.0",</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">Windows</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">Windows 10 20H2</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Electron should not crash</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Electron crashes when adding iframe</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><em>No response</em></p>
<p dir="auto"><a href="https://github.com/electron/electron/files/6211709/app.zip">app.zip</a></p>
<p dir="auto">I've the following component wich crashes electron:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export class SimpleReportViewer extends HTMLElement {
	constructor() {
		super();
		this.attachShadow({ mode: 'open' });
		this.container = document.createElement('div');
		this.shadowRoot.appendChild(this.container);
	}
	loadIframe() {
		if (this.isConnected) {
			this._iframe = document.createElement(&quot;iframe&quot;);
			this._iframe.style.width = &quot;100%&quot;;
			this._iframe.style.height = &quot;100%&quot;;
			this._iframe.src = '/iframe.html';
			this.container.appendChild(this._iframe);
		}
	}
	connectedCallback() {
		this.loadIframe();
	}
}
customElements.define('simple-report-viewer', SimpleReportViewer);"><pre class="notranslate"><code class="notranslate">export class SimpleReportViewer extends HTMLElement {
	constructor() {
		super();
		this.attachShadow({ mode: 'open' });
		this.container = document.createElement('div');
		this.shadowRoot.appendChild(this.container);
	}
	loadIframe() {
		if (this.isConnected) {
			this._iframe = document.createElement("iframe");
			this._iframe.style.width = "100%";
			this._iframe.style.height = "100%";
			this._iframe.src = '/iframe.html';
			this.container.appendChild(this._iframe);
		}
	}
	connectedCallback() {
		this.loadIframe();
	}
}
customElements.define('simple-report-viewer', SimpleReportViewer);
</code></pre></div>