JSFiddle - React, Tailwind, and code Playground
by ianlunn
HTML
<!DOCTYPE html>
<html>
<head>
<title>Parent</title>
<style type="text/css">
body {
-webkit-perspective: 800px;
}
iframe
{
left: 200px;
-webkit-transform: translateZ(130px);
}
</style>
</head>
<body>
<h2>Parent</h2>
<iframe src=""></iframe>
</body>
</html>
JavaScript
$(document).ready(function(){
var iframe = '<!DOCTYPE html><html><head><title>Child</title></head><body><h2>Child</h2><input type="text"></input><button onclick="alert(\'hello\');">Button</button></body></html>';
$('iframe').contents().find('body').html(iframe);
});