blob: 6d0540ef4d5bca11ddca2d32da37fb2d4f665b46 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
}
#scroller {
margin: 10px;
height: 300px;
width: 300px;
background-color: green;
overflow-y: scroll;
}
.contents {
width: 100%;
height: 200%;
background-color: silver;
}
.scrollbar-hider {
position: absolute;
top: 10px;
left: 294px;
width: 16px;
height: 300px;
background-color: gray;
}
</style>
<script>
if (window.internals)
internals.setUsesOverlayScrollbars(true);
function doTest()
{
var scroller = document.getElementById('scroller');
if (window.internals)
internals.unconstrainedScrollTo(scroller, 0, -150);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div id="scroller">
<div class="contents"></div>
</div>
<div class="scrollbar-hider"></div>
</body>
</html>