Version 1
[yaffs-website] / node_modules / phantomjs-prebuilt / lib / phantom / examples / countdown.js
diff --git a/node_modules/phantomjs-prebuilt/lib/phantom/examples/countdown.js b/node_modules/phantomjs-prebuilt/lib/phantom/examples/countdown.js
new file mode 100644 (file)
index 0000000..4dfd818
--- /dev/null
@@ -0,0 +1,10 @@
+"use strict";
+var t = 10,
+    interval = setInterval(function(){
+        if ( t > 0 ) {
+            console.log(t--);
+        } else {
+            console.log("BLAST OFF!");
+            phantom.exit();
+        }
+    }, 1000);