PhantomJS - canGoBack Property



The canGoBack property returns true if there is a previous page in the navigation history; if not, false.

Syntax

Its syntax is as follows −

page.canGoBack;

Example

The following examples demonstrates the use of canGoBack property.

var wpage = require('webpage').create(); 
console.log(wpage.canGoBack); 
phantom.exit();

It generates the following output

False
phantomjs_webpage_module_properties.htm
Advertisements