Created
May 26, 2014 21:11
-
-
Save matthewp/9906c438e22cadf0e450 to your computer and use it in GitHub Desktop.
Phantom + Traceur
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.onError = function(msg, trace){ | |
console.log(msg, trace); | |
}; | |
page.open('http://localhost/phantom_traceur/test.html', function() { | |
phantom.exit(); | |
}); | |
function debugPage() { | |
console.log("Refresh a second debugger-port page and open a second webkit inspector for the target page."); | |
console.log("Letting this page continue will then trigger a break in the target page."); | |
debugger; // pause here in first web browser tab for steps 5 & 6 | |
page.evaluateAsync(function() { | |
debugger; // step 7 will wait here in the second web browser tab | |
}); | |
} | |
//debugPage(); |
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
<html> | |
<head><title>Phantom test</title></head> | |
<body> | |
<script src="traceur.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment