Commit graph

378 commits

Author SHA1 Message Date
jaubourg a7cb93bee5 Renames Deferred's fire and fireReject methods as resolveWith and rejectWith respectively. 2011-01-20 17:51:57 +01:00
Anton M 265cf0efa7 Remove an unused regex and optimize character escape regex usage. 2011-01-19 00:15:28 +01:00
Brandon Sterne 220a0ce162 Defer scriptEval test until first use to prevent Content Security Policy inline-script violations from occuring. Fixes #7371. 2011-01-17 16:31:12 -05:00
jaubourg 5798446b98 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. 2011-01-16 18:33:32 +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
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
jaubourg 1ca82ccd94 Renamed "complete" to "done" in order to avoid conflicts with jXHR.complete. 2011-01-06 01:26:06 +01:00
jaubourg 47e4cc1a0f Fixed mixing of tabs & spaces to make JSLint happier. 2011-01-06 01:18:03 +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
unknown 524bf39400 jQuery.parseXML extracted from ajax & added to core, needs unit testing. 2010-12-31 04:05:50 +01:00
jaubourg 5bfbe7eaf6 Removed NFE to make old Safari happy and avoid leaks in IE (as per David Murdoch's warning). 2010-12-31 04:05:49 +01:00
jaubourg 2fec5dbecd Fixed a loop that only worked in webkit. 2010-12-31 04:02:33 +01:00
jaubourg 39d96ab8c5 Added deferred to core. Used internally for DOM readyness and ajax callbacks. 2010-12-31 04:01:39 +01:00
jaubourg 43828b7482 Removed NFE to make old Safari happy and avoid leaks in IE (as per David Murdoch's warning). 2010-12-31 03:56:11 +01:00
jaubourg c072dbd4e2 Fixed a loop that only worked in webkit. 2010-12-31 03:49:23 +01:00
jaubourg 5bacb53866 Added deferred to core. Used internally for DOM readyness and ajax callbacks. 2010-12-31 03:49:22 +01:00
Colin Snover 3e0cc81504 Clean trailing whitespace from all files. 2010-12-30 00:34:48 -06:00
Colin Snover 9029dc02a2 Update CommonJS module registration to check to see if define is a function instead of just not undefined. 2010-12-29 23:58:03 -06: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 bc05cb9d80 Merge branch 'explain-map-concat' of https://github.com/ajpiano/jquery into ajpiano-explain-map-concat 2010-12-09 12:51:14 -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
adam j. sontag 34bf1a2a7d Add a comment explaining that jQuery.map flattens arrays 2010-11-27 17:15:33 -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
John Resig 983548f8eb Make sure that if an additional load event is triggered (such as an iframe being dynamically injected in DOM ready) the ready event isn't triggered twice. Fixes #7352. 2010-11-09 13:44:06 -05:00
John Resig fb48ae8e6c Make sure that when multiple variables are being declared that assignments are each done on their own line. 2010-11-09 11:09:07 -05:00
jeresig 3df41db036 Make sure that the ready event doesn't double-fire when .bind(ready) is used. Fixes #7247. 2010-10-22 00:08:34 -04:00
John Resig a7d0b0b9e8 Var wasn't being explicitly declared. Fixes #7226. 2010-10-17 10:58:01 -04:00
jeresig 0be7f4eb4f Make sure that opacity is being reset properly on a show animation. Additionally expose jQuery.isNaN from the data module. 2010-09-27 11:51:01 -04:00
jeresig e0a9615f82 Make sure that the body element exists before doing the body selector optimization. Fixes #6529. 2010-09-24 15:53:38 -04:00
jeresig a220c81eb9 Increase the speed of the single setTimeout calls for the ready event. 2010-09-24 10:06:36 -04:00
jeresig 6dfdb14753 Merge branch 'master' of github.com:jquery/jquery 2010-09-23 12:09:49 -04:00
Robert Katic 484cc6e220 Made jQuery.type more consistent with host objects. 2010-09-23 12:08:41 -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 e270d804b4 Delay the result of the readyState check to give scripts the opportunity to delay ready, as described by @jrburke in 747ba7defd. 2010-09-23 11:38:22 -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 c8dd49f756 Unify the means of detecting a window across the library. Fixes jQuery UI bug #5438 and jQuery bugs #6575 and 6088. 2010-09-22 16:41:51 -04:00
jeresig 8e1d369710 Some minor lint fixes for the RegExp. 2010-09-22 09:46:21 -04:00
jeresig 9dc6e0c572 Applied the RegExp issues reported by Jeff Robinson here: http://jmrware.com/articles/2010/jqueryregex/jQueryRegexes.html Additionally broke out all remaining inline RegExp. Fixes #7062. 2010-09-22 09:16:28 -04:00
jeresig 19b5d9e874 Re-work the document scoping. 2010-09-22 08:08:45 -04:00
John Resig 1ac3713e7f Fix bug with the readyWait DOM ready addition. 2010-09-21 16:26:36 -04:00