Merge pull request #12700 from kolodny/patch-1

Update 2000-01-01-inject-js.md
gh-pages
Ariya Hidayat 2014-11-16 10:58:51 -08:00
commit dbf3318fa1
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ var page = webPage.create();
page.open('http://www.phantomjs.org', function(status) {
if (status === 200) {
page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function() {
if page.injectJs('do.js') {
if (page.injectJs('do.js')) {
var title = page.evaluate(function() {
// returnTitle is a function loaded from our do.js file - see below
return returnTitle();