bbf4059d9680527b238f5b668c4451f55e3c2feeRyan GroveGet Utility Change History
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove==========================
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* [!] The `Y.Get.abort()` method is now deprecated and will be removed in a
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove future version of YUI. Use the transaction-level `abort()` method instead.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* [!] The `charset` option is now deprecated and will be removed in a future
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove version of YUI. Specify an `attributes` object with a `charset` property
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* [!] The `win` option, which allowed you to specify the window into which
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove nodes should be inserted, is now deprecated and will be removed in a future
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove version of YUI. Use the `doc` option instead, which allows you to specify a
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove document, as opposed to a window (which makes more sense).
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* [!] The `win` property of transaction objects is now deprecated and will be
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove removed in a future version of YUI. Since any given request in a transaction
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove may now have its node inserted into any document, the best way to get this
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove info is to find the request you're interested in inside the transaction's
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove `requests` property, then look at that request's `doc` property to figure out
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove what document it's associated with.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* [!] The `tId` property of transaction objects is now deprecated and will be
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove removed in a future version of YUI. Use the `id` property instead.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* The Get Utility has been completely rewritten to improve performance and add
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove much-needed functionality. Backwards compatibility has been maintained, but
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove some methods and APIs have been deprecated and will be removed in a future
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove version of YUI.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* Multiple scripts within a transaction are now loaded in parallel whenever
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove possible in browsers that are capable of preserving execution order regardless
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove of load order. This improves performance in those browsers when loading
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove multiple scripts.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* Multiple CSS resources within a transaction are now always loaded
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove asynchronously, since CSS rules are applied based on the order of link nodes
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove in the document, not the order in which resources finish loading. This
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove improves performance in all browsers when loading multiple CSS files.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* Script and CSS resources that fail to load due to HTTP or network errors are
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove now correctly treated as failures in all browsers that support `error` events
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove on script or link nodes. Most browsers support this on script nodes, but only
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove Firefox 9+ currently supports this on link nodes.
781586490916285391ab7c48a64a430b588246d5Ryan Grove* CSS load completion is now detected reliably in older versions of
781586490916285391ab7c48a64a430b588246d5Ryan Grove WebKit (<535.24) and Firefox (<9), which don't support the `load` event on
781586490916285391ab7c48a64a430b588246d5Ryan Grove link nodes. Unfortunately, while our workaround makes it possible to detect
781586490916285391ab7c48a64a430b588246d5Ryan Grove when loading is complete, we still can't detect whether it completed
781586490916285391ab7c48a64a430b588246d5Ryan Grove successfully or with an error, so in these browsers CSS resources are always
781586490916285391ab7c48a64a430b588246d5Ryan Grove assumed to have loaded successfully.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* Added a `Y.Get.load()` method, which allows you to load both CSS and JS
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove resources in a single transaction.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* Added a `Y.Get.js()` method, which is now the preferred way to load JavaScript
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove resources. `Y.Get.script()` is now an alias for `js()`.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* Added a new `Y.Get.options` property containing global options that should be
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove used as the default for all requests, along with similar `cssOptions` and
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove `jsOptions` properties containing default options that apply only to CSS or
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove JS requests, respectively, and that take precedence over the global defaults.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* Added a new `pollInterval` option, which allows you to customize the polling
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove interval (in milliseconds) used to check for CSS load completion in WebKit and
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove Firefox <=8.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* The `css()`, `js()`, `load()`, and `script()` methods now return an instance
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove of `Y.Get.Transaction`, which encompasses one or more requests and contains
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove useful properties and methods for getting information about and manipulating
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove those requests (and related HTML nodes) as a unit.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* The `css()`, `js()`, `load()`, and `script()` methods now accept an optional
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove Node.js-style callback function as either the second or third parameter. This
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove function will be called after the transaction finishes. The first argument
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove is an array of errors, or `null` on success. The second argument is the
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove transaction object.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* The `css()`, `js()`, `load()`, and `script()` methods now accept URL strings,
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove objects of the form `{url: '...', [... options ...]}`, or arrays of URL
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove strings and/or objects. This allows you to specify per-URL options if desired,
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove such as node attributes, parent documents, `insertBefore` nodes, etc.
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove* The logic used to determine where a node should be inserted when no custom
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove `insertBefore` node has been specified has changed slightly. By default,
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove script and link nodes will now be inserted before the first `<base>` element
c30e767130b07eea304348b0efdcdb5215fda2b0Ryan Grove if there is one, or failing that, before the last child of the `<head>`
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove element, or if there's no `<head>` element, before the first `<script>`
d0fa6f87745bf4e7c206e531a67f5c433f52e92fRyan Grove element on the page.
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove* The source for the `get` module has moved from `src/yui` to `src/get`. This
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove allows it to be built separately from the core YUI modules.
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove* No changes.
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove* Added an `async` option to `script()`. When set to `true`, the specified
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove scripts will be loaded asynchronously (i.e. in parallel), and order of
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove execution is not guaranteed. The `onSuccess` callback will be called once,
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove after all scripts have finished loading.
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove* Added an `onProgress` callback, which is useful when loading multiple scripts
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove either in series or in parallel by passing an array of URLs to `script()`.
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove The `onProgress` callback is called each time a script finishes loading,
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove whereas `onSuccess` is only called once after all scripts have finished
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove* No changes.
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove* No changes.
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove* No changes.
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove* Inserted script nodes get `charset="utf-8"` by default.
bbf4059d9680527b238f5b668c4451f55e3c2feeRyan Grove* Initial release.