mirror of https://github.com/vitalif/phantomjs
Update 2000-01-01-quick-start.md
Update example on loadspeed.js to produce the output given in the example Add a couple of phantom.exit functions to code evaluation examples to ensure phantom is terminated after running scripts.gh-pages
parent
25b627de18
commit
5b3b6b08d2
|
@ -71,6 +71,7 @@ page.open(address, function(status) {
|
|||
console.log('FAIL to load the address');
|
||||
} else {
|
||||
t = Date.now() - t;
|
||||
console.log('Loading ' + system.args[1]);
|
||||
console.log('Loading time ' + t + ' msec');
|
||||
}
|
||||
phantom.exit();
|
||||
|
@ -101,6 +102,7 @@ page.open(url, function(status) {
|
|||
return document.title;
|
||||
});
|
||||
console.log('Page title is ' + title);
|
||||
phantom.exit();
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -115,6 +117,7 @@ page.open(url, function(status) {
|
|||
page.evaluate(function() {
|
||||
console.log(document.title);
|
||||
});
|
||||
phantom.exit();
|
||||
});
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue