Is it possible to change the screen dimensions as reported by screen.availWidth and screen.availHeight in PhantomJS 2.x? Although it is possible to specify the window size, it seems that the screen dimensions are always reported as 1024x768.
Note: although the solution for How do I override window.screen? works, I find it somewhat hacky and was wondering if there is a better way.