Skip to content

Instantly share code, notes, and snippets.

@forced-request
Created December 23, 2014 13:14
Show Gist options
  • Save forced-request/7ff7fe31632c23d47f6c to your computer and use it in GitHub Desktop.
Save forced-request/7ff7fe31632c23d47f6c to your computer and use it in GitHub Desktop.
SlimerJS callbacks not working
wp = require("webpage").create();
wp.onAlert = function(text) {
console.log("Alerted: " + text);
};
wp.content = "<html><body>Hello: <iframe src='f' onerror='prompt(299792458)'></iframe><script>window.alert(\"Normal Func\")</script></body></html>";
wp.evaluate(function (wp) {
}, wp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment