【发布时间】:2012-03-05 07:43:01
【问题描述】:
我正在使用最新版本的Yahoo User Interface。
我正在查看 YUI global 对象的文档,但我有一些问题。
我想知道一个模块何时加载,何时附加到特定实例?
YUI().use('calendar', function (Y) {
// I assume that when we are here that the calendar module has been loaded?
// But when is it attached to this instance of YUI?
});
如果第一个实例是这样声明的,我如何创建多个 YUI 沙箱:
var Y = YUI();
Y.use('node', 'event', function (Y) {
});
您还会将 Y 传递给两个实例吗?
【问题讨论】:
标签: javascript yui yahoo yahoo-api