Commit 407a7bb9 407a7bb926d4797d4e6370a4dbeedcb2c50f9263 by Nicolas Perriault

updated docs - refs #401, 402

1 parent e468c0f8
......@@ -101,6 +101,18 @@ casper.test.begin("Planning 4 tests", 4, function(test) {
Last, all the casper test suites have been upgraded to use the new testing features, you may want to have a look at the changes.
#### Request abortion
When using PhantomJS >=1.9.0, you can now abort outgoing requests:
```js
casper.on('page.resource.requested', function(requestData, request) {
if (requestData.url.indexOf('http://adserver.com') === 0) {
request.abort();
}
});
```
### Bugfixes & enhancements
- heavy lifting of casperjs bootstrap script
......
......@@ -273,6 +273,18 @@ Emitted when the HTTP response corresponding to current required url has been re
Emitted when a new HTTP request is performed to open the required url.
.. versionadded:: 1.1
**Arguments:** ``requestData, request``
You can also abort requests::
casper.on('page.resource.requested', function(requestData, request) {
if (requestData.url.indexOf('http://adserver.com') === 0) {
request.abort();
}
});
``popup.created``
~~~~~~~~~~~~~~~~~
......