Skip to content

Instantly share code, notes, and snippets.

@gleicon
Created October 20, 2014 18:03
Show Gist options
  • Save gleicon/bfc006ab267cf3f6dc76 to your computer and use it in GitHub Desktop.
Save gleicon/bfc006ab267cf3f6dc76 to your computer and use it in GitHub Desktop.
trying to run perfmap on phantomjs
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