1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-03 20:16:33 +02:00

Improved tests.

This commit is contained in:
kkapsner 2017-04-23 00:25:33 +02:00
parent 6fdf13bd10
commit c5bb80bbb8
2 changed files with 120 additions and 0 deletions

View file

@ -9,12 +9,14 @@
<h1>top Test</h1>
<img class="display" width="100%"><br>
Hash: <span class="hash"></span>
<button>refresh</button>
</div>
<div id="iframe">
<h1>iFrame Test. Thanks to DocumentRoot.</h1>
<img class="display" width="100%"><br>
Hash: <span class="hash"></span>
<iframe sandbox="allow-same-origin" style="display:none"></iframe>
<button>refresh</button>
</div>
<script>
(function(){
@ -33,7 +35,9 @@
}
show(document.getElementById("top"), topTest());
document.querySelector("#top button").addEventListener("click", function(){show(document.getElementById("top"), topTest());});
show(document.getElementById("iframe"), iframeTest());
document.querySelector("#iframe button").addEventListener("click", function(){show(document.getElementById("iframe"), iframeTest());});
}());
function draw(canvas){