- PhantomJS Tutorial
- PhantomJS - Home
- PhantomJS - Overview
- PhantomJS - Environment Setup
- PhantomJS - Object
- PhantomJS - Methods
- WebPage Module
- PhantomJS - Properties
- PhantomJS - Methods
- PhantomJS - Events/Callbacks
- PhantomJS - Child Process Module
- File System Module
- PhantomJS - Properties
- PhantomJS - Methods
- System Module
- PhantomJS - Properties
- Web Server Module
- PhantomJS - Properties
- PhantomJS - Methods
- Miscellaneous
- Command Line Interface
- PhantomJS - Screen Capture
- PhantomJS - Page Automation
- PhantomJS - Network Monitoring
- PhantomJS - Testing
- PhantomJS - REPL
- PhantomJS - Examples
- PhantomJS Useful Resources
- PhantomJS - Quick Guide
- PhantomJS - Useful Resources
- PhantomJS - Discussion
PhantomJS - navigationLocked Property
This property checks whether it is allowed to navigate a page or not. If true, it will be on the current page URL and clicking on that page to go to the next page will not be allowed. The default value is false for navigationLocked.
Syntax
Its syntax is as follows −
var wpage = require('webpage').create(); wpage.navigationLocked;
Example
Let us take an example to understand the use of navigationLocked property.
var wpage = require('webpage').create(); wpage.open('http://localhost/tasks/page1.html', function (status) { console.log(wpage.navigationLocked); phantom.exit(); });
It will generate the following output.
False
phantomjs_webpage_module_properties.htm
Advertisements