mirror of https://github.com/vitalif/phantomjs
Ported 'countdown.js' to PhantomJS 1.2
parent
b91f5b9632
commit
811c56b6f3
|
@ -1,8 +1,9 @@
|
|||
var t = 10;
|
||||
while (t > 0) {
|
||||
console.log(t);
|
||||
phantom.sleep(1000);
|
||||
t = t - 1;
|
||||
}
|
||||
console.log('BLAST OFF');
|
||||
phantom.exit();
|
||||
var t = 10,
|
||||
interval = setInterval(function(){
|
||||
if ( t > 0 ) {
|
||||
console.log(t--);
|
||||
} else {
|
||||
console.log("BLAST OFF!");
|
||||
phantom.exit();
|
||||
}
|
||||
}, 1000);
|
||||
|
|
Loading…
Reference in New Issue