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:
Tim Schaub
2008-02-29 00:16:47 +00:00
parent 145981c303
commit 836f037fda
4 changed files with 12 additions and 16 deletions
+4 -8
View File
@@ -72,10 +72,8 @@
//running request (cancelled) -- 4 tests + 1 test (for request abort)
tile.request = {
transport: {
'abort': function() {
t.ok(true, "request aborted");
}
'abort': function() {
t.ok(true, "request aborted");
}
};
OpenLayers.Tile.WFS.prototype.loadFeaturesForRegion.apply(tile, [g_Success]);
@@ -100,10 +98,8 @@
var _gAbort = false;
tile.request = {
transport: {
abort: function() {
_gAbort = true;
}
abort: function() {
_gAbort = true;
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Draw Feature Acceptance Test</title>
<title>Ajax Acceptance Test</title>
<style type="text/css">
body {
@@ -64,7 +64,7 @@
<ul>
<li>synchronous: "request completed" then "other processing"</li>
<li>asynchronous: "other processing" then "request completed"</li>
<li>abort: "request aborted" then "other processing"</li>
<li>abort: "request aborted" then "other processing" (note that real XHR behavior would not call onComplete with abort - meaning "request aborted" would not be displayed here)</li>
</ul>
</body>
</html>