Created
May 10, 2012 13:51
-
-
Save STRML/2653127 to your computer and use it in GitHub Desktop.
Simple PhantomJS file that dumps the contents of Ext.Loader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var page = require('webpage').create(), | |
t, address; | |
if (phantom.args.length === 0) { | |
console.log('Usage: dumpExtLoader.js <some URL>'); | |
phantom.exit(); | |
} else { | |
page.onConsoleMessage = function (msg) { | |
console.log(msg); | |
}; | |
address = phantom.args[0]; | |
page.open(address, function (status) { | |
if (status !== 'success') { | |
console.log('FAIL to load the address'); | |
} else { | |
page.evaluate(function(){ | |
Ext.onReady(function() { | |
Ext.Loader.history.forEach(function(item) { | |
console.log(Ext.Loader.getPath(item)); | |
}); | |
phantom.exit(); | |
}); | |
}); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment