Commit graph

208 commits

Author SHA1 Message Date
Gianni Chiappetta a03f040dbf Merge branch 'master' into proxy-native-bind
* master: (194 commits)
  Revert "Make sure that focusin/focusout bubbles in non-IE browsers." This was causing problems with the focusin event, see: #7340.
  Replaces "text in-between" technique with a full-fledged one-level transitive search for converters (unit tests added). Also cleans up auto dataType determination and adds converter checks in order to guess the best dataType possible.
  Moves determineResponse logic into main ajax callback. Puts responseXXX fields definitions into ajaxSettings.
  Removes misleading comment.
  Bring jQuery('#id') and jQuery('body') logic back into core (while leaving it in Sizzle at the same time). Was causing too much of a performance hit to leave it all to Sizzle.
  Renames Deferred's fire and fireReject methods as resolveWith and rejectWith respectively.
  Fix typo in regex tweak from previous commit.
  Renames determineDataType as determineResponse. Makes it more generic as a first step into integrating the logic into the main ajax done callback. Also fixes some comments in ajax/xhr.js.
  Move jQuery(...) selector speed-up logic into Sizzle(...) qSA handling. Additionally add in a new catch for Sizzle('.class') (avoid using qSA and use getElementsByClassName instead, where applicable).
  Revises the way arguments are handled in ajax.
  Makes sure statusCode callbacks are ordered in the same way success and error callbacks are. Unit tests added.
  Cleans up and simplifies code shared by ajaxPrefilter and ajaxTransport. Removes chainability of ajaxSetup, ajaxPrefilter and ajaxTransport. Also makes sure context is handled properly by ajaxSetup (unit test added).
  Rework unit tests to check actual result elements.
  Moves active counter test after all other ajax tests where it should be.
  Revised the Nokia support fallback. It turns out that Nokia supports the documentElement property but does not define document.compatMode. Adding this third fallback allows Nokia to run jQuery error-free and return proper values for window width and height.
  Moves things around to make jsLint happier.
  Fixes crossDomain test so that it assumes port to be 80 for http and 443 for https when it is not provided.
  Moves determineDataType into ajaxSettings so that it is accessible to transports without the need for a second argument and so that we can now pass the original options to the transport instead. Also ensures the original options are actually propagated to prefilters (they were not).
  Re-adds hastily removed variable and simplifies statusCode based callbacks handling.
  Use undefined instead of 0 to deference transport for clarity.
  ...

Conflicts:
	src/event.js
2011-01-21 09:58:55 -05:00
jaubourg a7cb93bee5 Renames Deferred's fire and fireReject methods as resolveWith and rejectWith respectively. 2011-01-20 17:51:57 +01:00
Colin Snover e78d3a7e2d Merge in data_nocollide branch. Fixes #6968, improves unit testing framework checks for leaky stuff. 2011-01-17 15:31:43 -06:00
jaubourg ac2e731b2d Added unit tests to check and demonstrate new jQuery.Deferred() works. 2011-01-17 17:52:30 +01:00
jaubourg c272f5f7da 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. 2011-01-16 17:41:39 +01:00
wycats fa45f25d1c Fix a failing subclass test due to a change in master 2011-01-14 11:17:32 -05:00
Jared Grippe d483ce0a9c added jQuery.subclass 2011-01-14 10:38:32 -05:00
Colin Snover b14f02899e 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. 2011-01-09 18:38:44 -06:00
Colin Snover e2941d5a98 Update unit tests with a leak detection mechanism for the various jQuery globals and fix all leaks in the tests. 2011-01-09 15:58:47 -06:00
jaubourg 1ca82ccd94 Renamed "complete" to "done" in order to avoid conflicts with jXHR.complete. 2011-01-06 01:26:06 +01:00
Colin Snover e56de77df9 Cleaning up trailing whitespace again. 2011-01-05 15:44:07 -06:00
wycats ae6655bcb6 Revert "Register as a CommonJS async module if in that kind of environment. Fixes #7102."
This reverts commit 6ffa730721.

Conflicts:

	src/core.js
2011-01-05 13:26:05 -08:00
jaubourg cbf591152c "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. 2011-01-05 04:29:30 +01:00
jaubourg 6fb9759a75 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. 2010-12-31 04:15:15 +01:00
jaubourg 6dbffb8596 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. 2010-12-31 04:15:11 +01:00
unknown 240d8b681e Removed custom method in isDeferred and when. 2010-12-31 04:05:56 +01:00
unknown 23d455b446 Deferred cannot be cancelled by returning false in a callback. Exception in the callback are still propagated and execution of remaining callbacks is still possible. 2010-12-31 04:05:55 +01:00
unknown 2d4001b82c Capitalized Deferred & _Deferred to clearly mark them as new types, like Event. 2010-12-31 04:05:53 +01:00
jaubourg 5bacb53866 Added deferred to core. Used internally for DOM readyness and ajax callbacks. 2010-12-31 03:49:22 +01:00
jrburke 6ffa730721 Register as a CommonJS async module if in that kind of environment. Fixes #7102. 2010-12-27 13:03:27 -06:00
Gianni Chiappetta 9f8cd6c499 Fixing $.proxy to work like (and use) Function.prototype.bind (ticket #7783)
http://bugs.jquery.com/ticket/7783
2010-12-14 21:53:04 -05:00
jeresig b4bb6e1126 Backing out fb6c038bf0, was causing jQuery.param tests to fail - unfixes #7413. 2010-12-09 13:07:44 -05:00
jeresig fb6c038bf0 Merge branch 'bug_7413' of https://github.com/rwldrn/jquery into rwldrn-bug_7413 2010-12-09 12:32:15 -05:00
Anton M 5c0b5d2560 Improve performance of get() for negative indices. Fixes #5476. 2010-11-19 12:28:13 +01:00
rwldrn fc563cc42a Fixes #7413; isEmptyObject() check to see if obj passes isPlainObject 2010-11-09 16:14:11 -05:00
Robert Katic 894bd02a06 Test jQuery.type also with document. 2010-09-23 12:08:54 -04:00
Robert Katic 484cc6e220 Made jQuery.type more consistent with host objects. 2010-09-23 12:08:41 -04:00
Robert Katic 97b42492bb Added some tests for #5991. 2010-09-23 12:07:22 -04:00
Robert Katic 694b625c92 Ensured that arrays are not considered same as plain object on deep extending. Fixes #5991. 2010-09-23 12:07:06 -04:00
jeresig d7a6e75241 Add some tests for jQuery.isWindow and make sure that we're operating against an object before testing. 2010-09-22 16:50:38 -04:00
jeresig bca5765502 Make sure that jQuery works even when the individual modules are loaded separately AND jQuery.noConflict(true) is used. Fixes #7011. 2010-09-08 13:54:33 -04:00
John Resig 5d2be7e299 Added some tweaks to $.type to handle null and undefined. Added a bunch of unit tests as well. 2010-08-27 06:10:52 -07:00
John Resig 396dd21273 Fixing getting/setting classes and makeArray(RegExp) for Blackberry 4.7. Fixes #6930, #6931. 2010-08-23 12:38:55 -07:00
jzaefferer 6f031c1015 Replace usage of the removed global reset() method with QUnit.reset(). 2010-07-28 17:19:01 +02:00
jeresig 3b221da8b0 Adjust isPlainObject test to run in an iframe. 2010-03-24 15:18:11 -04:00
jeresig 141ad3c3e2 Landing a faster trim method. Based upon the work by Travis Hardiman and DBJDBJ. More details here: http://forum.jquery.com/topic/faster-jquery-trim Fixes #2279, #4452, and #4835. 2010-03-09 09:14:27 -05:00
jeresig 94d925cd46 Make sure leading whitespace is trimmed for parseJSON. Fixes #6031. 2010-02-13 02:14:23 -05:00
jeresig b8076a914b Landing some minor perf optimization to jQuery(). 2010-01-28 17:17:51 -05:00
jeresig 781fe8b80d Make empty strings (and other non-string values) simply return null from parseJSON. Also added some parseJSON tests. Fixes #5859. 2010-01-23 17:08:26 -05:00
jeresig ea9e0ed841 Moved add() tests from core to traversing. 2010-01-23 16:54:24 -05:00
jeresig 5d49335eac Make sure that disconnected nodes aren't sorted/uniqued. Fixes #5791. 2010-01-13 00:12:18 -05:00
jeresig 8e53f7b5d6 Fixed typo in logic, also disabled function setters in this case to allow the functions to passthrough and bind. 2010-01-12 21:54:06 -05:00
Filipe Fortes 0d1a2c1b11 Make sure to do a deep copy on arrays. #5750 2010-01-07 00:11:22 +08:00
jeresig 230614b4df Merging in jQuery.proxy() branch. 2010-01-05 19:18:39 -05:00
jeresig ffb1867a43 Rewrite of jQuery.browser to become engine-centric, rather than browser-centric. Also attempt to determine the engine version in a smarter fashion, less prone to error. Finally, enhanced the test suite with 255 useragent strings from http://user-agent-string.info/download for testing. jQuery.browser.safari is now deprecated, use jQuery.browser.webkit instead. 2010-01-05 17:01:20 -05:00
jeresig 1d2b1a57da Added in jQuery.proxy(obj, name), like the method described in Secrets of the JavaScript Ninja and in Dojo's Hitch, and added in some unit tests. 2009-12-31 15:17:52 -05:00
jeresig c05712f0a5 Fixed the spacing from the last commit. 2009-12-18 12:43:35 -05:00
jeresig d40083c866 Disabled the passthrough .attr(method_name) functionality. You can now use it if you do: .attr({method_name: value}, true) OR as an easy initialization method: jQuery('<div/>', {html: '...', id: 'test'}). 2009-12-18 12:41:53 -05:00
Robert Katic 148fb7ba8e Made isPlainObject() supporting null, undefined, and window values on IE too. Also added some related tests. Fixes #5669. 2009-12-19 01:19:34 +08:00
John Resig 65ebf57c1e Make sure that dynamically-created elements don't have a parent. Fixes #5638. 2009-12-10 17:01:04 -08:00