aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2006-12-04 19:40:25 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2006-12-04 19:40:25 +0000
commit2bdd208e4100f0b28b595b93eb07f18f63aa8ce5 (patch)
tree7aeeffcdc608aa954801d198c27dd235f603aa51 /src/ajax
parenta6ce3031871aca7c067672e91d298dd2a5bf176c (diff)
downloadjquery-2bdd208e4100f0b28b595b93eb07f18f63aa8ce5.tar.gz
jquery-2bdd208e4100f0b28b595b93eb07f18f63aa8ce5.zip
Renamed preprocess to before, for consistency with form plugin
Diffstat (limited to 'src/ajax')
-rw-r--r--src/ajax/ajax.js8
-rw-r--r--src/ajax/ajaxTest.js2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js
index fe83993a7..cf6298d84 100644
--- a/src/ajax/ajax.js
+++ b/src/ajax/ajax.js
@@ -484,7 +484,7 @@ jQuery.extend({
* (Boolean) async - By default, all requests are send asynchronous (set to true).
* If you need synchronous requests, set this option to false.
*
- * (Function) preprocess - A pre-callback to set custom headers etc., the
+ * (Function) before - A pre-callback to set custom headers etc., the
* XMLHttpRequest is passed as the only argument.
*
* @example $.ajax({
@@ -525,7 +525,7 @@ jQuery.extend({
contentType: "application/x-www-form-urlencoded",
processData: true,
async: true,
- preprocess: null
+ before: null
}, s);
// if data available
@@ -568,8 +568,8 @@ jQuery.extend({
xml.setRequestHeader("Connection", "close");
// Allow custom headers/mimetypes
- if( s.preprocess )
- s.preprocess(xml);
+ if( s.before )
+ s.before(xml);
// Wait for a response to come back
var onreadystatechange = function(isTimeout){
diff --git a/src/ajax/ajaxTest.js b/src/ajax/ajaxTest.js
index a84df1d6c..0a740aa9b 100644
--- a/src/ajax/ajaxTest.js
+++ b/src/ajax/ajaxTest.js
@@ -286,7 +286,7 @@ test("$.ajax - preprocess", function() {
$.ajax({
url: "data/name.php",
data: {'req': true},
- preprocess: function(xml) {
+ before: function(xml) {
xml.setRequestHeader('customHeader', customHeader)
},
success: function(data) {