source: other-projects/FileTransfer-WebSocketPair/Themes/themebuilder/bin/phantomjs-1.9.2-macosx/examples/netlog.coffee@ 31525

Last change on this file since 31525 was 31525, checked in by ak19, 7 years ago

Nathan provided more stuff: Themes folder contains Sencha's Themebuilder which generates GXT Themes. It includes the .theme and generated .jar files for the project theme.

File size: 518 bytes
Line 
1page = require('webpage').create()
2system = require 'system'
3
4if system.args.length is 1
5 console.log 'Usage: netlog.coffee <some URL>'
6 phantom.exit 1
7else
8 address = system.args[1]
9 page.onResourceRequested = (req) ->
10 console.log 'requested ' + JSON.stringify(req, undefined, 4)
11
12 page.onResourceReceived = (res) ->
13 console.log 'received ' + JSON.stringify(res, undefined, 4)
14
15 page.open address, (status) ->
16 if status isnt 'success'
17 console.log 'FAIL to load the address'
18 phantom.exit()
Note: See TracBrowser for help on using the repository browser.