Fixed origin display in blobIframe

This commit is contained in:
kkapsner 2020-01-06 14:55:11 +01:00
parent 4020ba1ebd
commit 16fb042335
1 changed files with 4 additions and 1 deletions

View File

@ -7,7 +7,10 @@
document.getElementById("code").textContent = iframeCode;
const blob = new Blob([iframeCode], {type: "text/html"});
const blob = new Blob([iframeCode.replace(
"const origin = \"data URL iframe\";",
"const origin = \"blob iframe\";"
)], {type: "text/html"});
const newurl = window.URL.createObjectURL(blob);
document.getElementById("blobIframe").src = newurl;
}());