Created
October 20, 2014 18:03
-
-
Save gleicon/bfc006ab267cf3f6dc76 to your computer and use it in GitHub Desktop.
trying to run perfmap on phantomjs
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(); | |
page.onConsoleMessage = function(msg) { | |
console.log('INFO: ' + msg); | |
}; | |
page.open('http://www.example.com', function() { | |
page.evaluate(function() { | |
var el=document.createElement('script'); | |
el.src='https://zeman.github.io/perfmap/perfmap.js'; | |
document.body.appendChild(el); | |
}); | |
page.render('screenshot.png'); | |
phantom.exit() | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment