Edit in JSFiddle

document.getElementById('receiver').addEventListener('load', (event) => {
	event.target.contentWindow.postMessage({
		action: 'editors.add',
		params: {
			files: [new Uint8Array([72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100])]
		}
	}, 'https://hexed.it');
});
<h1>HexEd.it API - Minimal example</h1>

<iframe id="receiver" src="https://hexed.it"></iframe>
body {
	font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

iframe {
	width: 100%;
	height: 500px;

	border: 0;
}