Home | History | Annotate | Download | only in accessibility
      1 <!doctype html>
      2 <!--
      3 @MAC-DENY:AXTitle*
      4 @MAC-DENY:AXValue*
      5 @MAC-ALLOW:position*
      6 @MAC-ALLOW:size*
      7 
      8 @WIN-DENY:title*
      9 @WIN-ALLOW:location*
     10 @WIN-ALLOW:size*
     11 -->
     12 <html>
     13 <head>
     14 <style>
     15 iframe {
     16   border: 0;
     17   margin: 0;
     18   padding: 0;
     19 }
     20 div {
     21   width: 300px;
     22   height: 150px;
     23 }
     24 </style>
     25 </head>
     26 <body style="margin: 0; padding: 0;">
     27 
     28 <div>
     29   <button style="margin: 25px; border: 0; width: 250px; height: 50px">
     30     Button
     31   </button>
     32 </div>
     33 
     34 <div>
     35   <button style="margin: 25px; border: 0; width: 250px; height: 50px">
     36     Button
     37   </button>
     38 </div>
     39 
     40 <div><iframe id="frame1" style="width: 300px; height: 100px;"></iframe></div>
     41 
     42 <div><iframe id="frame2" style="width: 150px; height: 50px;"></iframe></div>
     43 
     44 <script>
     45 var frameCode =
     46     '<body style="margin: 0; padding: 0;">\n' +
     47     '<div style="width: 300px; height: 100px;">\n' +
     48     '  <button style="margin: 25px; border: 0; width: 250px; height: 50px">\n' +
     49     '    Button\n' +
     50     '  </button>\n' +
     51     '</div>\n' +
     52     '</body>\n';
     53 
     54 function writeFrameCode(frame) {
     55   var doc = frame.contentWindow.document;
     56   doc.open();
     57   doc.write(frameCode);
     58   doc.close();
     59 }
     60 
     61 var frame1 = document.getElementById('frame1');
     62 writeFrameCode(frame1);
     63 
     64 var frame2 = document.getElementById('frame2');
     65 writeFrameCode(frame2);
     66 frame2.contentWindow.scrollTo(150, 50);
     67 </script>
     68   
     69 </body>
     70 </html>
     71