What is an extjs sandbox?

こ雲淡風輕ζ 提交于 2019-11-30 09:12:41

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/9364033/what-is-an-extjs-sandbox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!