Changeset 6408
- Timestamp:
- 02/28/08 19:16:47 (11 months ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Ajax.js (modified) (3 diffs)
- trunk/openlayers/lib/OpenLayers/Tile/WFS.js (modified) (2 diffs)
- trunk/openlayers/tests/Tile/test_WFS.html (modified) (2 diffs)
- trunk/openlayers/tests/manual/ajax.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Ajax.js
r6313 r6408 54 54 * 55 55 * Returns: 56 * { OpenLayers.Ajax.Request} The request object. To abort loading, call57 * request. transport.abort();56 * {XMLHttpRequest} The request object. To abort loading, call 57 * request.abort(). 58 58 */ 59 59 OpenLayers.loadURL = function(uri, params, caller, … … 67 67 68 68 // from prototype.js 69 returnnew OpenLayers.Ajax.Request(69 var request = new OpenLayers.Ajax.Request( 70 70 uri, 71 71 { … … 76 76 } 77 77 ); 78 return request.transport; 78 79 }; 79 80 trunk/openlayers/lib/OpenLayers/Tile/WFS.js
r5839 r6408 67 67 this.url = null; 68 68 if(this.request) { 69 this.request. transport.abort();69 this.request.abort(); 70 70 //this.request.destroy(); 71 71 this.request = null; … … 112 112 loadFeaturesForRegion:function(success, failure) { 113 113 if(this.request) { 114 this.request.transport.abort(); 115 //this.request.destroy(); 114 this.request.abort(); 116 115 } 117 116 this.request = OpenLayers.loadURL(this.url, null, this, success); trunk/openlayers/tests/Tile/test_WFS.html
r6400 r6408 73 73 //running request (cancelled) -- 4 tests + 1 test (for request abort) 74 74 tile.request = { 75 transport: { 76 'abort': function() { 77 t.ok(true, "request aborted"); 78 } 75 'abort': function() { 76 t.ok(true, "request aborted"); 79 77 } 80 78 }; … … 101 99 var _gAbort = false; 102 100 tile.request = { 103 transport: { 104 abort: function() { 105 _gAbort = true; 106 } 101 abort: function() { 102 _gAbort = true; 107 103 } 108 104 } trunk/openlayers/tests/manual/ajax.html
r6346 r6408 1 1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 2 <head> 3 <title> Draw FeatureAcceptance Test</title>3 <title>Ajax Acceptance Test</title> 4 4 <style type="text/css"> 5 5 … … 65 65 <li>synchronous: "request completed" then "other processing"</li> 66 66 <li>asynchronous: "other processing" then "request completed"</li> 67 <li>abort: "request aborted" then "other processing" </li>67 <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> 68 68 </ul> 69 69 </body>
