The loadURL function now returns something that acts more like XMLHttpRequest should. If you name this return request, call request.abort to abort the request. r=crschmidt (closes #1386)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6408 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -53,8 +53,8 @@ OpenLayers.nullHandler = function(request) {
|
||||
* receive the request object as an argument.
|
||||
*
|
||||
* Returns:
|
||||
* {OpenLayers.Ajax.Request} The request object. To abort loading, call
|
||||
* request.transport.abort();
|
||||
* {XMLHttpRequest} The request object. To abort loading, call
|
||||
* request.abort().
|
||||
*/
|
||||
OpenLayers.loadURL = function(uri, params, caller,
|
||||
onComplete, onFailure) {
|
||||
@@ -66,7 +66,7 @@ OpenLayers.loadURL = function(uri, params, caller,
|
||||
: OpenLayers.nullHandler;
|
||||
|
||||
// from prototype.js
|
||||
return new OpenLayers.Ajax.Request(
|
||||
var request = new OpenLayers.Ajax.Request(
|
||||
uri,
|
||||
{
|
||||
method: 'get',
|
||||
@@ -75,6 +75,7 @@ OpenLayers.loadURL = function(uri, params, caller,
|
||||
onFailure: failure
|
||||
}
|
||||
);
|
||||
return request.transport;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user