OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <style> |
| 5 iframe { |
| 6 height: 900px; |
| 7 } |
| 8 |
| 9 div { |
| 10 height: 300px; |
| 11 overflow: auto; |
| 12 border: 1px solid black; |
| 13 } |
| 14 </style> |
| 15 <script> |
| 16 // We expect to get a message from the inner frame to tell us when |
| 17 // the inner frame's DOM is all set up. We need to scroll down from |
| 18 // this frame, and then, unfortunately, transfer control back to the |
| 19 // inner frame so that it can click on one of the select elements. |
| 20 window.onmessage = function() { |
| 21 document.getElementById('scrollable').scrollTop = 500; |
| 22 document.getElementById('frame').contentWindow.postMessage('', '*'); |
| 23 }; |
| 24 </script> |
| 25 </head> |
| 26 |
| 27 <body> |
| 28 <div id='scrollable'> |
| 29 <iframe id='frame' src='update-widget-positions-on-nested-frames-and-scrolle
rs-inner-frame.html'></iframe> |
| 30 </div> |
| 31 </body> |
| 32 </html> |
OLD | NEW |