Commit f6c19810 f6c19810ffb444b8ae943f5c00d4330ce68d75c7 by Darrell Hamilton

Rename lock to willNavigate

The phantomjs documentation[1] indicates that the lock variable is
named 'willNavigate'. After a quick test, the values passed reflect that
name, true indicating navigation will happen, false indicating it will
not.

[1]:
https://github.com/ariya/phantomjs/wiki/API-Reference-WebPage#onnavigationrequested
1 parent a82c0cbd
......@@ -2262,13 +2262,13 @@ function createPage(casper) {
casper.emit('load.finished', status);
casper.loadInProgress = false;
};
page.onNavigationRequested = function onNavigationRequested(url, type, lock, isMainFrame) {
casper.log(f('Navigation requested: url=%s, type=%s, lock=%s, isMainFrame=%s',
url, type, lock, isMainFrame), "debug");
page.onNavigationRequested = function onNavigationRequested(url, type, willNavigate, isMainFrame) {
casper.log(f('Navigation requested: url=%s, type=%s, willNavigate=%s, isMainFrame=%s',
url, type, willNavigate, isMainFrame), "debug");
if (isMainFrame && casper.requestUrl !== url) {
casper.navigationRequested = true;
}
casper.emit('navigation.requested', url, type, lock, isMainFrame);
casper.emit('navigation.requested', url, type, willNavigate, isMainFrame);
};
page.onPageCreated = function onPageCreated(popupPage) {
casper.emit('popup.created', popupPage);
......