什么是 extjs 沙箱? [英] What is an extjs sandbox?

查看:17
本文介绍了什么是 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!

推荐答案

Ext JS 沙箱只是顶级命名空间上的不同名称.

An Ext JS sandbox is simply a different name on the top-level namespace.

通常,所有 Ext JS 代码都属于Ext"命名空间,因此您可以将类称为 Ext.Element、Ext.MessageBox 等.沙箱(特别是 Ext JS 4 沙箱)使用Ext4"代替(如在 Ext4.Element 中),因此您可以同时使用多个版本的 Ext JS,而无需担心命名冲突.有时它们可​​以很好地配合使用,但有时它们不能很好地配合使用,因此您不能将 Ext4.Elements 添加到 Ext.Panel(至少,并非不费吹灰之力).

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).

Ext JS 发行版包括列为沙箱的文件,您将在项目中与标准文件一起引用这些文件.

The Ext JS distribution includes files listed as sandbox that you would reference in your project along with your standard files.

查看沙盒示例在 Ext JS 文档页面上查看它的运行情况.不过,您需要使用浏览器的调试器来查看源代码和脚本.

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.

这篇关于什么是 extjs 沙箱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆