1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +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> </div>
<script src="testAPI.js"></script> <script src="testAPI.js"></script>
<script src="canvasAPI.js"></script> <script src="canvasAPI.js"></script>
<script src="iframeAPI.js"></script>
<script src="test.js"></script> <script src="test.js"></script>
</body></html> </body></html>

View File

@ -158,3 +158,13 @@ async function offscreenTest(){
return {url: await testAPI.readBlob(blob)}; 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);
});