displayFrame = function (iframe) {
    var div=document.createElement("div");
    div.innerHTML = iframe.contentWindow.document.body.innerHTML;
    if (div.children.length == 1) {
      div = div.children[0];
    }
    iframe.parentNode.replaceChild(div, iframe);
  }
Replace the existing iframe with the content of the iframe
If the iframe has a single root element, it will directly replace the iframe.
If there are several roots, a wrapping div will be created and will replace the iframe
@param  {HTMLElement} iframe