OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script> |
| 3 if (window.internals) { |
| 4 internals.settings.setOverlayScrollbarsEnabled(true); |
| 5 internals.settings.setMockScrollbarsEnabled(true); |
| 6 } |
| 7 </script> |
| 8 <div id="div" style="overflow: scroll; width: 200px; height: 200px;"> |
| 9 <div style="background-color: green; height: 3000px; width: 100px"></div> |
| 10 </div> |
| 11 <iframe srcdoc="<div style='background-color: red; height: 3000px; width: 100px'
></div>" |
| 12 id="iframe", |
| 13 width="200", |
| 14 height="200"></iframe> |
| 15 <script> |
| 16 window.onload = function() { |
| 17 if (window.internals) { |
| 18 internals.settings.setOverlayScrollbarsEnabled(true); |
| 19 |
| 20 var div = document.querySelector('#div'); |
| 21 var iframe = document.querySelector('#iframe'); |
| 22 internals.setScrollbarVisibilityInScrollableArea(div, true); |
| 23 internals.setScrollbarVisibilityInScrollableArea( |
| 24 iframe.contentDocument, true); |
| 25 |
| 26 internals.setScrollbarVisibilityInScrollableArea(div, false); |
| 27 internals.setScrollbarVisibilityInScrollableArea( |
| 28 iframe.contentDocument, false); |
| 29 } |
| 30 } |
| 31 </script> |
OLD | NEW |