ariya/phantomjs — pull request #11303 by Vitallium (2013-05-09 12:22:35+00:00)
Title: Define the new page callback for interrupting a long-running JavaScript

This pull request defines the new page callback `onShouldInterruptJs`. Using this callback user can interrupt a long running JavaScript code.

Usage:
````
page.onShouldInterruptJs = function() {
return true; // return `true` to interrupt JavaScript code
};
````

Issues:
https://github.com/ariya/phantomjs/issues/11198
https://github.com/ariya/phantomjs/issues/11183
https://github.com/ariya/phantomjs/issues/11189