Reputation: 845
Is there a way in [pure] JavaScript to maximise a browser window and increase its height such that it doesn't have scroll bars? Even if the height becomes greater than the screen.
Thanks all
The reason I want to do this is so that I can capture the full page of the site as an image using selenium. The native selenium functions do not work on all browsers and do not do exactly what I want so I've built my own image capture in C sharp but I need some JS code to increase height of browser.
Upvotes: 0
Views: 1368
Reputation: 5563
The html
element has the overflow
property added to it with a value of hidden
.
Check this to hide the browser scrollbar
Upvotes: 0
Reputation: 6706
There is no pretty solution, but this is as close as you get: How to make the window full screen with Javascript (stretching all over the screen)
Upvotes: 1