什么是 extjs 沙箱?
我有兴趣了解 extjs 沙箱,但在网络上找不到太多相关信息。有人可以告诉或指出一些相关资源来了解 extjs 沙箱是什么以及它是如何工作的吗?提前致谢!
I was interested in knowing about extjs sandbox but wasn't able to find much about it on web. Could someone tell or point to some relevant resource as to what an extjs sandbox is and how does it work. Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Ext JS 沙箱只是顶级命名空间的不同名称。
通常,所有 Ext JS 代码都属于“Ext”命名空间,因此您可以将类称为 Ext.Element、Ext.MessageBox 等。沙箱(特别是 Ext JS 4 沙箱)使用“Ext4”代替(如Ext4.Element),因此您可以同时使用多个版本的 Ext JS,而不必担心命名冲突。有时它们可以很好地协同工作,但通常情况下却不然,因此您无法将 Ext4.Elements 添加到 Ext.Panel(至少,需要付出相当大的努力)。
Ext JS 发行版包含列为沙箱的文件,您将在项目中与标准文件一起引用这些文件。
查看 Ext 上的沙箱示例 JS 文档页面以查看其实际效果。不过,您需要使用浏览器的调试器来查看源代码和脚本。
An Ext JS sandbox is simply a different name on the top-level namespace.
Normally, all Ext JS code falls under the "Ext" namespace, so you would refer to classes as Ext.Element, Ext.MessageBox, etc. The sandbox (specifically, the Ext JS 4 sandbox) uses "Ext4" instead (as in Ext4.Element), so you can use multiple versions of Ext JS alongside each other without worrying about naming collisions. Sometimes they play well together, often times they do not, so you can't go adding Ext4.Elements to an Ext.Panel (at least, not without considerable effort).
The Ext JS distribution includes files listed as sandbox that you would reference in your project along with your standard files.
Check out the Sandbox example on the Ext JS docs page to see it in action. You need to use your browser's debugger to view the source and scripts, though.