aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/movies.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/movies.js')
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/movies.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/movies.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/movies.js
new file mode 100644
index 00000000..73c61a7e
--- /dev/null
+++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/movies.js
@@ -0,0 +1,14 @@
+// List movies from kids-in-mind.com
+
+var cbfunc = function (data) {
+ globaldata= data;
+ var list = data.query.results.movie;
+ list.forEach(function (item) {
+ console.log(item.title + ' [' + item.rating.MPAA.content + ']');
+ });
+ phantom.exit();
+};
+
+var el = document.createElement('script');
+el.src = 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20movies.kids-in-mind&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=cbfunc';
+document.body.appendChild(el);