YUI 配置对象

发布于 2024-08-29 16:00:26 字数 295 浏览 2 评论 0原文

我注意到阅读 YUI 文档 它说:

YUI(o*)

参数: o* 最多五个可选配置对象。这个物体是 存储在 YUI.config 中。请参阅配置 支持的属性列表。

将其限制为 5 个配置对象背后的原因是什么?当查看配置类时,似乎有超过 5 种可能性,那么为什么要限制呢?

I noticed reading the YUI documentation that it says:

YUI ( o* )

Parameters:
o* Up to five optional configuration objects. This object is
stored in YUI.config. See config for
the list of supported properties.

What would be the reasoning behind limiting it to 5 configuration objects? There are appear to be more than 5 possibilities when looking at the config class, so why limit?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浮生未歇 2024-09-05 16:00:26

这意味着它支持 YUI({ someConfig: value }, { anotherConfig: value }, { aThird: config }, { aFourth: config, { andFinally: aFifth });

每个对象可以包含任意数量的配置。构造函数支持多个配置对象,以在大型系统中提供灵活性,但为了代码大小维护,仅限于五个。实现者不太可能使用第二个配置对象,因为更复杂的应用程序可以在 YUI 实例化之前简单地构建单个配置对象。

如果确实需要超过五个,则可以提交合理合理的功能请求来提高限制。就我个人而言,我不认为这种情况会发生。

That means it supports YUI({ someConfig: value }, { anotherConfig: value }, { aThird: config }, { aFourth: config, { andFinally: aFifth });

Each object can contain any amount of configuration. The constructor supports multiple config objects for flexibility in larger systems, but is limited to five for code size maintenance. It's very unlikely implementers will use even a second config object since more complex apps can simply build up a single config object prior to YUI instantiation.

If a real need arises to have more than five, a reasonably justified feature request could be submitted to raise the limit. Personally, I don't see this happening.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文