forked from ariya/phantomjs
-
Notifications
You must be signed in to change notification settings - Fork 23
Tips and Tricks
James M. Greene edited this page May 26, 2013
·
2 revisions
PhantomJS does not set the background color of the web page at all, it is left to the page to decide its background color. If the page does not set anything, then it remains transparent.
To force a certain color for the web page background, use the following code:
page.evaluate(function() {
document.body.bgColor = 'white';
});
Make sure this is executed before caling render() function of the web page.