mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
parent
6aab7f68ea
commit
fd09e3d5cf
@ -184,7 +184,7 @@
|
||||
getterGenerator: function(checker){
|
||||
const temp = {
|
||||
get outerWidth(){
|
||||
return checkerWrapper(checker, this, arguments, getFaker(window => window.innerWidth));
|
||||
return checkerWrapper(checker, this, arguments, getFaker(window => window.top.innerWidth));
|
||||
}
|
||||
};
|
||||
return Object.getOwnPropertyDescriptor(temp, "outerWidth").get;
|
||||
@ -196,7 +196,7 @@
|
||||
getterGenerator: function(checker){
|
||||
const temp = {
|
||||
get outerHeight(){
|
||||
return checkerWrapper(checker, this, arguments, getFaker(window => window.innerHeight));
|
||||
return checkerWrapper(checker, this, arguments, getFaker(window => window.top.innerHeight));
|
||||
}
|
||||
};
|
||||
return Object.getOwnPropertyDescriptor(temp, "outerHeight").get;
|
||||
|
4
test/screenSizeTest.css
Normal file
4
test/screenSizeTest.css
Normal file
@ -0,0 +1,4 @@
|
||||
#iframe {
|
||||
position: fixed;
|
||||
top: -2000%;
|
||||
}
|
@ -6,9 +6,11 @@
|
||||
<link href="testIcon.svg" type="image/png" rel="icon">
|
||||
<link href="testIcon.svg" type="image/png" rel="shortcut icon">
|
||||
<link rel="stylesheet" href="../default.css" type="text/css">
|
||||
<link rel="stylesheet" href="./screenSizeTest.css" type="text/css">
|
||||
<style type="text/css"></style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="iframe"></iframe>
|
||||
<h1>Screen size test</h1>
|
||||
<h2>Expected result</h2>
|
||||
<ul>
|
||||
|
@ -187,6 +187,14 @@ addResolutionTest("window properties: outer...", function(type){
|
||||
];
|
||||
});
|
||||
|
||||
addResolutionTest("iframe properties: outer...", function(type){
|
||||
"use strict";
|
||||
|
||||
return document.getElementById("iframe").contentWindow[
|
||||
"outer" + type.substring(0, 1).toUpperCase() + type.substring(1)
|
||||
];
|
||||
});
|
||||
|
||||
async function searchValue(tester){
|
||||
"use strict";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user