The YUI team released version 2.5.1 today and it’s available for download from SourceForge. This is a general patch release with 67 issues addressed throughout the library. 2.5.1 improves support for developers running YUI in Adobe’s AIR environment and addresses an important security issue raised over the weekend regarding JSON parsing in FireFox. Here are all the top-level items for 2.5.1:
evaled. Douglas’s fix for this is now incorporated in the YUI JSON Utility.
yuiloader-dom-event.js: We’ve added a new rollup file, yuiloader-dom-event.js, which contains the light YUI Core (Yahoo Global Object, Dom Collection, and Event Utility) and adds to it the YUI Loader (which includes the Get Utility for dynamically adding script and CSS resources). This new aggregate file is the ideal baseline rollup to use when you want to be able to lazy-load any part of YUI on-demand. YUI Loader will calculate the dependency tree for the components you want to add, load the optimized resource list in the correct order, then fire your callback making use of the newly added components:
<!--Load then new yuiloader-dom-event aggregate file:-->
<script type="text/javascript"
src="http://yui.yahooapis.com/2.5.1/build/yuiloader-dom-event/yuiloader-dom-event.js" >
</script>
<!--Now, when you want to use a new component, you can just do this:-->
<script type="text/javascript">
// Instantiate and configure Loader:
var loader = new YAHOO.util.YUILoader({
// Identify the components you want to load. Loader will automatically
// identify any additional dependencies required for the specified
// components.
require: ["button", "slider"],
// Configure loader to pull in optional dependencies. For example,
// animation is an optional dependency for slider.
loadOptional: true,
// The function to call when all script/css resources have been loaded
onSuccess: function() {
//this is your callback function; you can use
//this space to call all of your instantiation
//logic for the components you just loaded.
//so, you can implement button safely here:
var oButton = new YAHOO.widget.Button("mybutton");
}
});
// Load the files onto the page:
loader.insert();
</script>
For full details on using the YUI Loader, see its User’s Guide. Note: YUI Loader is now included in the utilities.js aggregate as well.
March 19, 2008 at 6:14 pm
Nice work on the bug fixes!
March 19, 2008 at 7:47 pm
[...] Configurator。 [官方报道] [YUI2.5.1本地版] alimama_pid=”mm_10579781_632506_1614673″; [...]
March 21, 2008 at 1:49 pm
Man, you guys are mind readers! Loader bundled with Dom Event: the butter hit!
March 21, 2008 at 5:06 pm
It must have been the changes to DataSource parsing, but I noticed in my tests that AutoComplete is WAY faster in this release than 2.5.0. Thanks very much for the continued excellent work!
March 24, 2008 at 7:27 pm
YUI configurator is really nice. Thanks for cool service.
March 24, 2008 at 11:17 pm
[...] YUI 2.5.1 Released: Improved AIR support, JSON security patch, YUI Configurator, and bug fixes – The title says it all really – updated YUI [...]
March 28, 2008 at 4:04 pm
[...] version 2.5.1 has been released. The Yahoo! User Interface (YUI) Library is a set of utilities and controls, [...]