mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 02:21:53 +01:00
iframe test: added nested iframes test
This commit is contained in:
parent
ce1925d95f
commit
d8b5ba0744
@ -82,6 +82,21 @@
|
||||
document.write(part);
|
||||
});
|
||||
document.write("<script>log(\"TEST:\", \"ifr|ame split:\", compare(test(window[6]), reference));<\/script>");
|
||||
document.write("<iframe></iframe>" +
|
||||
"<script>" +
|
||||
"let parent = window[7];" +
|
||||
"let loopDepth = 1;" +
|
||||
"for (; loopDepth < 50; loopDepth+= 1){" +
|
||||
"parent.document.write(\"<iframe></iframe>\");" +
|
||||
"const newParent = parent[0];" +
|
||||
"if (!newParent){" +
|
||||
"break;" +
|
||||
"}" +
|
||||
"parent = newParent;" +
|
||||
"}" +
|
||||
"log(\"TEST:\", \"nested iFrame (depth = \" + loopDepth + \")\", compare(test(parent), reference));" +
|
||||
"document.body.removeChild(document.querySelector(\"iframe:last-of-type\"))" +
|
||||
"<\/script>");
|
||||
window.addEventListener("load", function(){
|
||||
"use strict";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user