|
1 Get Utility Change History |
|
2 ========================== |
|
3 |
|
4 3.10.3 |
|
5 ------ |
|
6 |
|
7 * No changes. |
|
8 |
|
9 3.10.2 |
|
10 ------ |
|
11 |
|
12 * No changes. |
|
13 |
|
14 3.10.1 |
|
15 ------ |
|
16 |
|
17 * No changes. |
|
18 |
|
19 3.10.0 |
|
20 ------ |
|
21 |
|
22 * No changes. |
|
23 |
|
24 3.9.1 |
|
25 ----- |
|
26 |
|
27 * No changes. |
|
28 |
|
29 3.9.0 |
|
30 ----- |
|
31 |
|
32 * Added fake transaction object to Node.js version |
|
33 |
|
34 3.8.1 |
|
35 ----- |
|
36 |
|
37 * No changes. |
|
38 |
|
39 3.8.0 |
|
40 ----- |
|
41 |
|
42 * No changes. |
|
43 |
|
44 3.7.3 |
|
45 ----- |
|
46 |
|
47 * Fixed Get issues, highlighted by IE10. |
|
48 |
|
49 1) IE10 seems to interrupt JS execution, in the case of a 304'ing script to invoke |
|
50 the onLoad handler. If this happened inside the transaction execute loop, the transaction |
|
51 would terminate early (call onSuccess before all scripts were done), because the _waiting |
|
52 count would only reflect the number of scripts added to the DOM, when the loop was |
|
53 interrupted. Changed the logic so that we only finish a transaction when the expected |
|
54 number of requests are accounted for which seems reasonable in general. |
|
55 |
|
56 Also wrapped the internal onLoad/onError callbacks in a setTimeout for IE10, so we're |
|
57 re-introducing asynchronicty for external onSuccess, etc. app code. We can take this out |
|
58 when/if the bug below gets fixed. |
|
59 |
|
60 http://connect.microsoft.com/IE/feedback/details/763871/dynamically-loaded-scripts-with-304s-responses-interrupt-the-currently-executing-js-thread-onload |
|
61 |
|
62 2) transaction._finish() would move on to the next transaction, before the current |
|
63 transaction's onSuccess/Finish/End listeners were invoked, since the logic to move to |
|
64 the next transaction was invoked before the `on` listeners were invoked. This meant that |
|
65 for all browsers, when issuing a CSS transaction followed by a JS transaction, the CSS |
|
66 success callback wouldn't be invoked until the JS transaction was initiated. |
|
67 |
|
68 3) Added user-agent to feature test for async support, because IE10 wasn't returning true for it. |
|
69 If IE10 ends up fixing the issue below by GA, we'll pull out the explicit ua test. |
|
70 |
|
71 https://connect.microsoft.com/IE/feedback/details/763477/ie10-doesnt-support-the-common-feature-test-for-async-support |
|
72 |
|
73 --- |
|
74 |
|
75 Get should work OK with IE10 now aside from one pending issue. If you issue 2 Get |
|
76 requests to the same 404ing script, IE10 doesn't call the success handler for the |
|
77 subsequent valid (200 etc.) request. This seems to be an IE10 issue, which we cannot |
|
78 control: |
|
79 |
|
80 https://connect.microsoft.com/IE/feedback/details/763466/ie10-dynamic-script-loading-bug-async-404s |
|
81 |
|
82 3.7.0 |
|
83 ----- |
|
84 |
|
85 * No changes. |
|
86 |
|
87 3.6.0 |
|
88 ----- |
|
89 |
|
90 * No changes. |
|
91 |
|
92 3.5.1 |
|
93 ----- |
|
94 |
|
95 * Fixed a bug that could cause CSS requests to hang on WebKit versions between |
|
96 535.3 and 535.9 (inclusive). |
|
97 |
|
98 |
|
99 3.5.0 |
|
100 ----- |
|
101 |
|
102 * [!] The `Y.Get.abort()` method is now deprecated and will be removed in a |
|
103 future version of YUI. Use the transaction-level `abort()` method instead. |
|
104 |
|
105 * [!] The `charset` option is now deprecated and will be removed in a future |
|
106 version of YUI. Specify an `attributes` object with a `charset` property |
|
107 instead. |
|
108 |
|
109 * [!] The `win` option, which allowed you to specify the window into which |
|
110 nodes should be inserted, is now deprecated and will be removed in a future |
|
111 version of YUI. Use the `doc` option instead, which allows you to specify a |
|
112 document, as opposed to a window (which makes more sense). |
|
113 |
|
114 * [!] The `win` property of transaction objects is now deprecated and will be |
|
115 removed in a future version of YUI. Since any given request in a transaction |
|
116 may now have its node inserted into any document, the best way to get this |
|
117 info is to find the request you're interested in inside the transaction's |
|
118 `requests` property, then look at that request's `doc` property to figure out |
|
119 what document it's associated with. |
|
120 |
|
121 * [!] The `tId` property of transaction objects is now deprecated and will be |
|
122 removed in a future version of YUI. Use the `id` property instead. |
|
123 |
|
124 * The Get Utility has been completely rewritten to improve performance and add |
|
125 much-needed functionality. Backwards compatibility has been maintained, but |
|
126 some methods and APIs have been deprecated and will be removed in a future |
|
127 version of YUI. |
|
128 |
|
129 * Multiple scripts within a transaction are now loaded in parallel whenever |
|
130 possible in browsers that are capable of preserving execution order regardless |
|
131 of load order. This improves performance in those browsers when loading |
|
132 multiple scripts. |
|
133 |
|
134 * Multiple CSS resources within a transaction are now always loaded |
|
135 asynchronously, since CSS rules are applied based on the order of link nodes |
|
136 in the document, not the order in which resources finish loading. This |
|
137 improves performance in all browsers when loading multiple CSS files. |
|
138 |
|
139 * Script and CSS resources that fail to load due to HTTP or network errors are |
|
140 now correctly treated as failures in all browsers that support `error` events |
|
141 on script or link nodes. Most browsers support this on script nodes, but only |
|
142 Firefox 9+ currently supports this on link nodes. |
|
143 |
|
144 * CSS load completion is now detected reliably in older versions of |
|
145 WebKit (<535.24) and Firefox (<9), which don't support the `load` event on |
|
146 link nodes. Unfortunately, while our workaround makes it possible to detect |
|
147 when loading is complete, we still can't detect whether it completed |
|
148 successfully or with an error, so in these browsers CSS resources are always |
|
149 assumed to have loaded successfully. |
|
150 |
|
151 * Added a `Y.Get.load()` method, which allows you to load both CSS and JS |
|
152 resources in a single transaction. |
|
153 |
|
154 * Added a `Y.Get.js()` method, which is now the preferred way to load JavaScript |
|
155 resources. `Y.Get.script()` is now an alias for `js()`. |
|
156 |
|
157 * Added a new `Y.Get.options` property containing global options that should be |
|
158 used as the default for all requests, along with similar `cssOptions` and |
|
159 `jsOptions` properties containing default options that apply only to CSS or |
|
160 JS requests, respectively, and that take precedence over the global defaults. |
|
161 |
|
162 * Added a new `pollInterval` option, which allows you to customize the polling |
|
163 interval (in milliseconds) used to check for CSS load completion in WebKit and |
|
164 Firefox <=8. |
|
165 |
|
166 * The `css()`, `js()`, `load()`, and `script()` methods now return an instance |
|
167 of `Y.Get.Transaction`, which encompasses one or more requests and contains |
|
168 useful properties and methods for getting information about and manipulating |
|
169 those requests (and related HTML nodes) as a unit. |
|
170 |
|
171 * The `css()`, `js()`, `load()`, and `script()` methods now accept an optional |
|
172 Node.js-style callback function as either the second or third parameter. This |
|
173 function will be called after the transaction finishes. The first argument |
|
174 is an array of errors, or `null` on success. The second argument is the |
|
175 transaction object. |
|
176 |
|
177 * The `css()`, `js()`, `load()`, and `script()` methods now accept URL strings, |
|
178 objects of the form `{url: '...', [... options ...]}`, or arrays of URL |
|
179 strings and/or objects. This allows you to specify per-URL options if desired, |
|
180 such as node attributes, parent documents, `insertBefore` nodes, etc. |
|
181 |
|
182 * The logic used to determine where a node should be inserted when no custom |
|
183 `insertBefore` node has been specified has changed slightly. By default, |
|
184 script and link nodes will now be inserted before the first `<base>` element |
|
185 if there is one, or failing that, before the last child of the `<head>` |
|
186 element, or if there's no `<head>` element, before the first `<script>` |
|
187 element on the page. |
|
188 |
|
189 * The source for the `get` module has moved from `src/yui` to `src/get`. This |
|
190 allows it to be built separately from the core YUI modules. |
|
191 |
|
192 |
|
193 3.4.1 |
|
194 ----- |
|
195 |
|
196 * No changes. |
|
197 |
|
198 |
|
199 3.4.0 |
|
200 ----- |
|
201 |
|
202 * Added an `async` option to `script()`. When set to `true`, the specified |
|
203 scripts will be loaded asynchronously (i.e. in parallel), and order of |
|
204 execution is not guaranteed. The `onSuccess` callback will be called once, |
|
205 after all scripts have finished loading. |
|
206 |
|
207 * Added an `onProgress` callback, which is useful when loading multiple scripts |
|
208 either in series or in parallel by passing an array of URLs to `script()`. |
|
209 The `onProgress` callback is called each time a script finishes loading, |
|
210 whereas `onSuccess` is only called once after all scripts have finished |
|
211 loading. |
|
212 |
|
213 |
|
214 3.3.0 |
|
215 ----- |
|
216 |
|
217 * No changes. |
|
218 |
|
219 |
|
220 3.2.0 |
|
221 ----- |
|
222 |
|
223 * No changes. |
|
224 |
|
225 |
|
226 3.1.1 |
|
227 ----- |
|
228 |
|
229 * No changes. |
|
230 |
|
231 |
|
232 3.1.0 |
|
233 ----- |
|
234 |
|
235 * Inserted script nodes get `charset="utf-8"` by default. |
|
236 |
|
237 |
|
238 3.0.0 |
|
239 ----- |
|
240 |
|
241 * Initial release. |