mirror of
https://github.com/ariya/phantomjs.git
synced 2024-09-11 04:46:09 +03:00
page_events example should show requests and navigate to step2url
http://code.google.com/p/phantomjs/issues/detail?id=1028
This commit is contained in:
parent
58566bbe76
commit
5d6b8240f7
@ -25,7 +25,7 @@ printArgs = ->
|
||||
ilen = arguments_.length
|
||||
|
||||
while i < ilen
|
||||
console.log " arguments[" + i + "] = " + arguments_[i]
|
||||
console.log " arguments[" + i + "] = " + JSON.stringify(arguments_[i])
|
||||
++i
|
||||
console.log ""
|
||||
sys = require("system")
|
||||
@ -33,7 +33,7 @@ page = require("webpage").create()
|
||||
logResources = false
|
||||
step1url = "http://en.wikipedia.org/wiki/DOM_events"
|
||||
step2url = "http://en.wikipedia.org/wiki/DOM_events#Event_flow"
|
||||
logResources = true if sys.args > 1 and sys.args[1] is "-v"
|
||||
logResources = true if sys.args.length > 1 and sys.args[1] is "-v"
|
||||
|
||||
#//////////////////////////////////////////////////////////////////////////////
|
||||
page.onInitialized = ->
|
||||
@ -102,7 +102,7 @@ setTimeout (->
|
||||
setTimeout (->
|
||||
console.log ""
|
||||
console.log "### STEP 2: Load '" + step2url + "' (load same URL plus FRAGMENT)"
|
||||
page.open step1url
|
||||
page.open step2url
|
||||
), 5000
|
||||
setTimeout (->
|
||||
console.log ""
|
||||
|
@ -25,14 +25,14 @@ var sys = require("system"),
|
||||
step1url = "http://en.wikipedia.org/wiki/DOM_events",
|
||||
step2url = "http://en.wikipedia.org/wiki/DOM_events#Event_flow";
|
||||
|
||||
if (sys.args > 1 && sys.args[1] === "-v") {
|
||||
if (sys.args.length > 1 && sys.args[1] === "-v") {
|
||||
logResources = true;
|
||||
}
|
||||
|
||||
function printArgs() {
|
||||
var i, ilen;
|
||||
for (i = 0, ilen = arguments.length; i < ilen; ++i) {
|
||||
console.log(" arguments[" + i + "] = " + arguments[i]);
|
||||
console.log(" arguments[" + i + "] = " + JSON.stringify(arguments[i]));
|
||||
}
|
||||
console.log("");
|
||||
}
|
||||
@ -109,7 +109,7 @@ setTimeout(function() {
|
||||
setTimeout(function() {
|
||||
console.log("");
|
||||
console.log("### STEP 2: Load '" + step2url + "' (load same URL plus FRAGMENT)");
|
||||
page.open(step1url);
|
||||
page.open(step2url);
|
||||
}, 5000);
|
||||
|
||||
setTimeout(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user