javascript Backbone.js 是如何跨浏览器的?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8389222/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How cross browser is backbone.js?
提问by
We are working with several browser types - on web, mobile, tablet and smart-tv. We are looking into backbone.js for our mvc.
我们正在使用多种浏览器类型——网络、手机、平板电脑和智能电视。我们正在为我们的 mvc 研究backbone.js。
Is there any known cross browser limitations of backbone.js?
是否有任何已知的backbone.js 跨浏览器限制?
采纳答案by c4urself
I think this has less to do with Backbone then it has to do with the HTML and CSS you use. You can see a list of mobile uses of Backbone here: http://backbonejs.org/#examples. jQuery is commonly used together with Backbone and has a great track record of browser compatiblity. Check that out here: http://docs.jquery.com/Browser_Compatibility.
我认为这与 Backbone 的关系不大,而与您使用的 HTML 和 CSS 有关。您可以在此处查看 Backbone 的移动使用列表:http: //backbonejs.org/#examples。jQuery 通常与 Backbone 一起使用,并且在浏览器兼容性方面有着良好的记录。在这里查看:http: //docs.jquery.com/Browser_Compatibility。
See also the backbone test suite mentioned by lwburk
另见 lwburk 提到的主干测试套件
回答by Hymanlin
I'm just starting to learn backbone.js but we had a browser related issue regarding the history.
我刚开始学习backbone.js,但我们有一个关于历史的浏览器相关问题。
This:
这:
Backbone.history.start({pushState: true})
Has some trouble with older browsers.
旧浏览器有一些问题。
That's all we've run into so far, but the project is still pretty new.
这就是我们迄今为止遇到的所有问题,但该项目仍然很新。
Here's a related link on backbone's github:
这是主干的 github 上的相关链接:
回答by explunit
c4urself's answer is good, but bringing things up to date with more recent evidence:
c4urself 的回答很好,但通过最近的证据更新:
According to this commentby braddunbar in their github issues list, they don't have an official support document, but "to my knowledge Backbone supports IE6+, and the latest version of Chrome, Safari, Firefox, and Opera"
根据此评论通过braddunbar在他们的github问题清单,他们没有正式的支持文档,但“据我所知骨干支持IE6 +和Chrome,Safari浏览器,火狐和Opera的最新版本”
They have a test suite herewhich you can run in whatever browser you want in order to test support.
他们在这里有一个测试套件,您可以在您想要的任何浏览器中运行它以测试支持。
See also the support information for their dependencies:
另请参阅其依赖项的支持信息:
- jQuery: http://docs.jquery.com/Browser_Compatibility
- Underscore: Can't find anything official either, but this comment on issue "Cut support for IE6-8 and other older browsers"by library author (of both underscore and backbone) jashkenas says "Underscore should always be a simple, single script that supports all of the environments you're likely to encounter as a JavaScript developer out of the box. Code that is written to work against one version of Underscore should just work, cross-platform."
- JSON-js: can't find anything explicit, but since the point of the library "are for applications that are expected to run in obsolete web browsers" that don't have the JSON object, I'd say that's not going to be an issue.
- jQuery:http: //docs.jquery.com/Browser_Compatibility
- 下划线:也找不到任何官方内容,但是库作者(下划线和主干)jashkenas对“削减对 IE6-8 和其他旧浏览器的支持”问题的评论说“下划线应该始终是一个简单的单一脚本,支持开箱即用的 JavaScript 开发人员可能会遇到的所有环境。针对一个版本的 Underscore 编写的代码应该可以跨平台工作。”
- JSON-js:找不到任何明确的内容,但是由于库的重点“适用于预期在没有 JSON 对象的过时 Web 浏览器中运行的应用程序”,我会说这不会是一个问题。
回答by Jan ?apsa
Backbone is developed to be as cross browser as possible. Even though they are using history api there is a fallback for it.
Backbone 被开发为尽可能跨浏览器。即使他们正在使用历史 API,也有一个后备。
You can safely develop any modern web app using it.
您可以使用它安全地开发任何现代 Web 应用程序。