aboutsummaryrefslogtreecommitdiffstats
path: root/tests/html/viewport.html
blob: bd0dbb8bc65c9af63c47c056147cf51342444a11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
  <head>
    <title>Test innerHeight</title>
    <script type="text/javascript">
      function show(){
        console.log("innerHeight: "+ window.innerHeight);
        console.log("innerWidth: "+ window.innerWidth);
        console.log("ScrollY: "+ window.scrollY);
        console.log("ScrollX: "+ window.scrollX);
        console.log("outerHeight: "+ window.outerHeight);
        console.log("outerWidth: "+ window.outerWidth);
        console.log("screenY: "+ window.screenY);
        console.log("screenX: "+ window.screenX);
      }
      function test_scroll(){

      }
    </script>
  </head>
  <body>
    <button onclick="show();">Test</button>
    <button onclick="window.scroll(0,100);">Scroll</button>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <br/>
    <button onclick="window.moveTo(100,10);">Move</button>
    <button onclick="window.scroll(0,10);">Scroll 2</button>
    <div style="background-color: #b0c4de; height:1000px; width:800px;"/>
    <button onclick="show();">Test</button>
  </body>
</html>