1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 21:00:23 +01:00
CanvasBlocker/test/dataUrlTest.js
kkapsner eb1a441625 Aded blob scheme test.
To reprooduce #212 and #213.
2018-07-21 13:20:45 +02:00

13 lines
351 B
JavaScript

(function(){
"use strict";
var iframeCode = atob(
document.getElementById("iframe").src.replace(/^.+base64,/, "")
);
document.getElementById("code").textContent = iframeCode;
var blob = new Blob([iframeCode], {type : 'text/html'});
var newurl = window.URL.createObjectURL(blob);
document.getElementById("blobIframe").src = newurl;
}());