fix searching within cross-origin iframes

This commit is contained in:
wareya committed 2018-11-15 02:37:06 -05:00
1 parent 157e93f3a0
commit 213ad8d4be
1 file changed
+14 -1
+14 -1
View File
@@ -164,7 +164,20 @@ function display_div(middle, x, y)
let newx = x;
let newy = y;
let mydoc = document;
while(find_root.parent && find_root.parent != find_root && find_root.parent.document.body.tagName != "FRAMESET")
function is_not_frameset(root)
{
try
{
return root.parent.document.body.tagName != "FRAMESET";
}
catch(err)
{
return false;
}
}
while(find_root.parent && find_root.parent != find_root && is_not_frameset(find_root))
{
let rect = find_root.frameElement.getBoundingClientRect();
//let rx = find_root.offsetLeft;//rect.x;