John Resig [Tue, 18 Jan 2011 20:13:09 +0000 (15:13 -0500)]
Add another tweak for handling CSP - we need to make sure that we don't trigger any eval on load (not sure if it's the best tweak, definitely not ideal). Add a test page as well so that it's easier to catch problem.
Colin Snover [Tue, 18 Jan 2011 03:06:57 +0000 (21:06 -0600)]
Clarify cygwin instructions slightly and swap the order of arguments to which in Makefile because of a bug in current versions of MSYS that causes only the first argument to /bin/which to be searched.
Colin Snover [Tue, 18 Jan 2011 00:49:24 +0000 (18:49 -0600)]
Replace build system with a faster new one that uses Node and UglifyJS and generates smaller minified files. Also removes builds through rake/ant since having 3 different build systems was too much to maintain (make was the only one consistently kept up-to-date). Fixes #7973.
Colin Snover [Mon, 17 Jan 2011 21:22:49 +0000 (15:22 -0600)]
Introduce a temporary hack to allow jQuery.fn.data("events") to continue to work. This will be going away in 1.6. More information will be available in the 1.5 release notes.
jaubourg [Sun, 16 Jan 2011 17:33:32 +0000 (18:33 +0100)]
Put the split to get the list of promise methods out of the promise method itself and also switched from jQuery.each to a while loop to remove as much overhead as possible. Thanks go to scott_gonzalez for reminding me of this.
jaubourg [Sun, 16 Jan 2011 16:41:39 +0000 (17:41 +0100)]
Implements joined jQuery.when statements. Makes it so calling jQuery.when with no parameter returns a resolved promise. Ensures promise method on promises supports the promise(obj) signature. Ensures a deferred and its promise always return the same promise (itself for the promise). Unit tests provided.
jaubourg [Sun, 16 Jan 2011 01:57:39 +0000 (02:57 +0100)]
Fixes #2994. Not finding a transport now fires the error callbacks and doesn't make ajax return false. Had to revise how jsonp and script prefilters & transports work (better separation of concerns). Also took the opportunity to revise jXHR getRequestHeader and abort methods and enabled early transport garbage collection when the request completes.
jeresig [Fri, 14 Jan 2011 19:12:29 +0000 (14:12 -0500)]
Revert "Revert fb4445070cd9e06929c7b6f27c10dbf42d4a3367 which is no longer necessary with the release of Opera 11. Fixes #7608." We will be continuing to support Opera 10.6 in jQuery 1.5.
Scott González [Fri, 14 Jan 2011 14:55:40 +0000 (09:55 -0500)]
Avoid running jQuery.unique() for methods that are guaranteed to produce a unique result set. Fixes #7964 - Some traversal methods perform an unnecessary uniqueness check.
jaubourg [Thu, 13 Jan 2011 17:33:24 +0000 (18:33 +0100)]
Moved jQuery.ajax.prefilter and jQuery.ajax.transport to jQuery.ajaxPrefilter and jQuery.ajaxTransport so that proxying the ajax method doesn't turn into a nightmare. Thanks go to scott_gonzalez and DaveMethvin for pointing out the issue. Also made ajaxSetup return "this" to enable chainable definitions -- jQuery.ajaxSetup(...).ajaxPrefilter(...).ajaxTransport(...).
jaubourg [Thu, 13 Jan 2011 16:01:25 +0000 (17:01 +0100)]
Fixes #4964. Adds a statusCode object together with a new statusCode method on the jXHR object (deferred behaviour). They accept a map of statusCode/callback(s). Callbacks are fired when the status code of the response correponds to the key (as a success or an error callback depending on how the request completed). Unit tests added.
jaubourg [Thu, 13 Jan 2011 15:58:16 +0000 (16:58 +0100)]
Removed xhr pooling since failing cross-domain requests leaves the xhr object in an undefined state in Firefox. Also rewrote comments related to the active xhr list so that they make sense.
jaubourg [Tue, 11 Jan 2011 22:01:18 +0000 (23:01 +0100)]
Fixes #6230. Added a unit test to control that, since the ajax rewrite, setting the Accept header actually replaced the previous value and didn't append to it (tested in Safari 4.0.4 for which the problem was specifically reported).
Colin Snover [Mon, 10 Jan 2011 00:38:44 +0000 (18:38 -0600)]
Ensure that buildFragment clones elements properly in all browsers. Fixes #3879, #6655. Also improves form element clone tests and fixes bugs in $.fn.clone exposed by these new test cases related to the values of checkboxes and radio buttons in IE.
jaubourg [Sun, 9 Jan 2011 20:19:27 +0000 (21:19 +0100)]
Fixes #5803. Reworked jsonp prefilter so that it sets the dataType as jsonp and recognizes requests with originalSettings having jsonp or jsonpCallback to be jsonp. Moved default jsonp option value into ajaxSettings. Attached the transport to "jsonp" which avoids unnecessary testing. Transport factory sets dataType back to json for proper data conversion.
jaubourg [Sun, 9 Jan 2011 15:50:13 +0000 (16:50 +0100)]
Fixes #5955. Option crossDomain now forces ajax to consider a request as cross-domain even when it is not. Useful for when servers issue redirects to cross-domain urls. Unit test added.
jaubourg [Sun, 9 Jan 2011 05:01:00 +0000 (06:01 +0100)]
Fixes #7465. Reworked the regexp and associated test for cross-domain detection so that it now includes ports. Added cross-domain detection tests for protocol, hostname and port.
jaubourg [Wed, 5 Jan 2011 03:29:30 +0000 (04:29 +0100)]
"then" renamed "complete" and new "then" method defined using "complete" and "fail" internally. The API is still symetrical (complete/fail), still promotes AOP but is also now Promise/A compliant. Changed unit tests and ajax module accordingly.
jaubourg [Thu, 30 Dec 2010 16:06:53 +0000 (17:06 +0100)]
Simplified the way a Promise is tested for (removed promiseMarker). Removed isCancelled helper method from _Deferred, wasn't used nor tested. Reworked jQuery.Deferred and removed unnecessary variables. Also ensured a Promise will return itself when asked for a Promise. Finally, the jQuery.when tests have been revamped.
jaubourg [Tue, 28 Dec 2010 03:13:44 +0000 (04:13 +0100)]
Introduced a new promise method on deferreds that returns an immutable object (exposing then, fail, isResolved, isRejected and promise itself only). Remove $.isDeferred and moved logic directly into $.when. Made sure $.when returns a promise by using promise(). Used promise() in ajax code too.
jaubourg [Sat, 25 Dec 2010 17:54:37 +0000 (18:54 +0100)]
Removed re-usability from jXHR object (no more open, send & onreadystatechange support). Streamlined the implementation and put it back into ajax.js (removed xhr.js in the process). Went back to a more simple & direct approach to options handling (keeping much room to further minification-related optimizations). Code is cleaner, smaller & faster. Removed & edited unit tests accordingly. All build files have had xhr.js removed.