A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1) Don't be alarmed, this is a starting point for discussion. | ||||||||||||||||||||
2 | 2) Deprecation is reversible or deferrable, but removal requires notice. So when in doubt, deprecate. | ||||||||||||||||||||
3 | Inspiration: | ||||||||||||||||||||
4 | http://mathiasbynens.be/demo/jquery-size | THE DOCUMENT YOU ARE READING: http://goo.gl/Vzaxa | |||||||||||||||||||
5 | |||||||||||||||||||||
6 | |||||||||||||||||||||
7 | General thoughts on space-focused refactor | ||||||||||||||||||||
8 | Can we refactor to allow basic ajax functions without the need for $.ajax/Callbacks/Deferreds? Basically expose the transports in some bare form. | ||||||||||||||||||||
9 | How will this affect UI and Mobile? Make our reduced subset work with them (esp Mobile) so they get the reduced size benefit | ||||||||||||||||||||
10 | Whenever we deprecate, we should note the version number of the deprecation in the comments | ||||||||||||||||||||
11 | |||||||||||||||||||||
12 | Feature | Deprecate | Remove | Saving | Replacement | Reasoning | Volunteer | ||||||||||||||
13 | 33,288 | Gzip 1.7 size | |||||||||||||||||||
14 | EVENT | ||||||||||||||||||||
15 | Global events e.g., $("#el").ajaxReady(...) | -40 | $(document).ajaxReady(...) or (leaky) COMPAT PLUGIN | avoids expensive groping event list; simplifies event/data code and api docs | |||||||||||||||||
16 | data events (setData, getData) | -94 | pub/sub or plugin | expensive performance, undocumented, and strange | |||||||||||||||||
17 | exclusive events ("click!") | -35 | none | undocumented forever, only used by data events afaik | |||||||||||||||||
18 | $().bind("ready") | -17 | $.ready(fn) | ready semantics don't match event semantics; error-prone | |||||||||||||||||
19 | "hover" pseudo-event | -54 | "mouseenter mouseleave" | semantics (hover != mouse passing over); confused with .hover() method, breaks use of a real "hover" event | |||||||||||||||||
20 | .live(), .die() | 1.7 | -46 | .on() or .delegate() | Bad semantics, error prone and hard to understand; see docs page | ||||||||||||||||
21 | load() unload() error() | -12 | .on("NAME", fn) or .trigger("NAME") | rarely-used shorthand methods; .load() is ambiguous with the ajax method; jQuery.fn.error and jQuery.error are not related | |||||||||||||||||
22 | event.attrChange attrName relatedNode srcElement wheelDelta | 1.7 | 1.8 | -27 | event.originalEvent.NAME | non-standard browser-specific properties, copying wastes time | |||||||||||||||
23 | ATTRIBUTES | ||||||||||||||||||||
24 | 1.6.1 boolean attr hacks | -141 | .prop() | simplifies .attr() and makes API consistent, faster, smaller | |||||||||||||||||
25 | value attrHook | 1.7 | 1.8 | -45 | none | Unnecessary and .attr('value') does nothing special without its removal | |||||||||||||||
26 | tabIndex attrHook | -4 | none | Fixes selector compat and is consistent with attr's purpose | |||||||||||||||||
27 | AJAX | ||||||||||||||||||||
28 | jqXHR.complete success error | 1.7 | -28 | jqXHR.always done fail | make consistent with Deferred (why do we need completeDeferred?) | ||||||||||||||||
29 | SELECTOR | ||||||||||||||||||||
30 | :file :image :password :radio :reset :submit :text :button | -213 | input[type=WHATEVER] | allow use of qSA, be standard | |||||||||||||||||
31 | CSS | ||||||||||||||||||||
32 | jQuery.curCSS | 1.5 | -10 | jQuery.css | http://google.com/codesearch#search/&q=.curCSS%5C(&type=cs seems to only turn up jquery.js itself | mikesherov | |||||||||||||||
33 | MANIPULATION | ||||||||||||||||||||
34 | |||||||||||||||||||||
35 | CORE | ||||||||||||||||||||
36 | jQuery.browser | 1.4 | 1.9 | -215 | OFFICIAL PLUGIN | not good practice, hard to maintain, NOT maintained | rwaldron | ||||||||||||||
37 | deferred.isResolved isRejected | 1.7 | 1.8 | -14 | deferred.state | boolean methods suck | |||||||||||||||
38 | .pushStack() selector maintenance | -93 | none; mainly a debugging thing | wasn't/can't be maintained for arbitrary manipulation/traversal; used by .live() | |||||||||||||||||
39 | .sub() | -187 | OFFICIAL PLUGIN | http://google.com/codesearch#search/&q=(\$|jQuery)\.sub\( | rwaldron | ||||||||||||||||
40 | |||||||||||||||||||||
41 | DATA | ||||||||||||||||||||
42 | .data("events") | 1.7 | 1.8 | -27 | jQuery._data(elem, "events") | We've already asked, few legit uses beyond debugging | |||||||||||||||
43 | TRAVERSING | ||||||||||||||||||||
44 | $().closest(Array)==>Array | 1.7 | 1.8 | -56 | none | really an internal function, used by old live-event code | |||||||||||||||
45 | |||||||||||||||||||||
46 | -1,358 | Total savings | |||||||||||||||||||
47 | 31,930 | Theoretical reduced size | |||||||||||||||||||
48 | |||||||||||||||||||||
49 | |||||||||||||||||||||
50 | |||||||||||||||||||||
51 | |||||||||||||||||||||
52 | |||||||||||||||||||||
53 | |||||||||||||||||||||
54 | |||||||||||||||||||||
55 | |||||||||||||||||||||
56 | |||||||||||||||||||||
57 | |||||||||||||||||||||
58 | |||||||||||||||||||||
59 | |||||||||||||||||||||
60 | |||||||||||||||||||||
61 | |||||||||||||||||||||
62 | |||||||||||||||||||||
63 | |||||||||||||||||||||
64 | |||||||||||||||||||||
65 | |||||||||||||||||||||
66 | |||||||||||||||||||||
67 | |||||||||||||||||||||
68 | |||||||||||||||||||||
69 | |||||||||||||||||||||
70 | |||||||||||||||||||||
71 | |||||||||||||||||||||
72 | |||||||||||||||||||||
73 | |||||||||||||||||||||
74 | |||||||||||||||||||||
75 | |||||||||||||||||||||
76 | |||||||||||||||||||||
77 | |||||||||||||||||||||
78 | |||||||||||||||||||||
79 | |||||||||||||||||||||
80 | |||||||||||||||||||||
81 | |||||||||||||||||||||
82 | |||||||||||||||||||||
83 | |||||||||||||||||||||
84 | |||||||||||||||||||||
85 | |||||||||||||||||||||
86 | |||||||||||||||||||||
87 | |||||||||||||||||||||
88 | |||||||||||||||||||||
89 | |||||||||||||||||||||
90 | |||||||||||||||||||||
91 | |||||||||||||||||||||
92 | |||||||||||||||||||||
93 | |||||||||||||||||||||
94 | |||||||||||||||||||||
95 | |||||||||||||||||||||
96 | |||||||||||||||||||||
97 | |||||||||||||||||||||
98 | |||||||||||||||||||||
99 | |||||||||||||||||||||
100 |