Commit graph

211 commits

Author SHA1 Message Date
jaubourg a43a5ca9cf Revert "Adds an invert method to promises that returns a "inverted" promise that is resolved when the underlying deferred is rejected and rejected when the underlying deferred is resolved."
This reverts commit 4e97543051.
2011-02-18 18:06:26 +01:00
Anton M 8e40a84c24 Fix some unscoped tests which failed after recent changes to QUnit. 2011-02-15 21:03:34 +01:00
jaubourg 4e97543051 Adds an invert method to promises that returns a "inverted" promise that is resolved when the underlying deferred is rejected and rejected when the underlying deferred is resolved. 2011-01-31 14:49:14 +01:00
jeresig 749d41f7de Rename jQuery.subclass() to jQuery.sub(). 2011-01-31 08:21:42 -05:00
Digitalxero e00f74c43b Make sure subclass is a proper subclass not just subclassing the fn methods. Fixes #7979. 2011-01-27 13:35:06 -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
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