1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-11-10 15:18:52 +01:00

Added iFrame tests

This commit is contained in:
kkapsner 2024-08-15 16:58:24 +02:00
parent 1b76df7cbc
commit af5365b4eb
2 changed files with 12 additions and 1 deletions

View File

@ -102,5 +102,6 @@
</div>
<script src="testAPI.js"></script>
<script src="canvasAPI.js"></script>
<script src="iframeAPI.js"></script>
<script src="test.js"></script>
</body></html>

View File

@ -157,4 +157,14 @@ async function offscreenTest(){
await offscreenCanvas.toBlob();
return {url: await testAPI.readBlob(blob)};
}
}
iframeAPI.forEachMethod(async function(windowToUse, name){
"use strict";
const {url, imageData, isPointInPath} = canvasAPI.fingerprint(windowToUse);
const hashes = await Promise.all([
testAPI.hash(url),
imageData? testAPI.hash(imageData.data): ""
]);
console.log(name, hashes[0], "/", hashes[1], isPointInPath);
});