Skip to content

Instantly share code, notes, and snippets.

@doug65536
Forked from anonymous/tk
Last active August 29, 2015 14:07
Show Gist options
  • Save doug65536/1126a92a8680623e01cc to your computer and use it in GitHub Desktop.
Save doug65536/1126a92a8680623e01cc to your computer and use it in GitHub Desktop.
var self = this,
renderFrame = self.document.getElementById("render_frame"),
iFrame = self.document.getElementById('iframe_exec'),
interval;
interval = setInterval(function() {
var nodes = iFrame.contentDocument.body.cloneNode(true), frag;
frag = document.createDocumentFragment();
for (var i = 0, ch = nodes.children; e = ch.length; i != e; ++i)
frag.appendChild(ch[i]);
renderFrame.innerHTML = '';
renderFrame.appendChild(frag);
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment