OLD | NEW |
1 <html> | 1 <html> |
2 <style> | 2 <style> |
3 body { | 3 body { |
4 background-color: white; | 4 background-color: white; |
5 } | 5 } |
6 | 6 |
7 iframe { | 7 iframe { |
8 border: 2px solid black; | 8 border: 2px solid black; |
9 } | 9 } |
10 </style> | 10 </style> |
11 <script> | 11 <script> |
12 function log(msg) | 12 function log(msg) |
13 { | 13 { |
14 document.getElementById('log').appendChild(document.createTextNode(msg + '\n
')); | 14 document.getElementById('log').appendChild(document.createTextNode(msg + '\n
')); |
15 } | 15 } |
16 | 16 |
17 function windowFocused(win, name) | 17 function windowFocused(win, name) |
18 { | 18 { |
19 return function() { | 19 return function() { |
20 win.document.body.style.background = "green"; | |
21 log(name + ': window focused'); | 20 log(name + ': window focused'); |
22 } | 21 } |
23 } | 22 } |
24 | 23 |
25 function windowBlurred(win, name) | 24 function windowBlurred(win, name) |
26 { | 25 { |
27 return function() { | 26 return function() { |
28 win.document.body.style.background = "red"; | 27 win.document.body.style.background = "red"; |
29 log(name + ': window blurred'); | 28 log(name + ': window blurred'); |
30 } | 29 } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 <iframe id="upper" src="resources/frame-tab-focus-upper.html" height="300"><
/iframe> | 146 <iframe id="upper" src="resources/frame-tab-focus-upper.html" height="300"><
/iframe> |
148 <iframe id="child" tabindex="4" src="resources/frame-tab-focus-child.html"><
/iframe> | 147 <iframe id="child" tabindex="4" src="resources/frame-tab-focus-child.html"><
/iframe> |
149 <input type="text"> | 148 <input type="text"> |
150 <a tabindex="1" href="#">[tabindex of one]</a> | 149 <a tabindex="1" href="#">[tabindex of one]</a> |
151 <a tabindex="3" href="#">[tabindex of three]</a> | 150 <a tabindex="3" href="#">[tabindex of three]</a> |
152 <a tabindex="2" href="#">[tabindex of two]</a> | 151 <a tabindex="2" href="#">[tabindex of two]</a> |
153 <a tabindex="3" href="#">[tabindex of three]</a> | 152 <a tabindex="3" href="#">[tabindex of three]</a> |
154 <pre id="log"></pre> | 153 <pre id="log"></pre> |
155 </body> | 154 </body> |
156 </html> | 155 </html> |
OLD | NEW |