避免混乱的浏览器死亡

发布于 2024-09-29 21:28:06 字数 363 浏览 0 评论 0原文

在过去的几个月里,我一直在开发一个大型网络应用程序。我们已经多次根据 DOM 和 DOM 编写了代码。 JS 规范,应该可以完美工作,但仍然设法完全杀死我们的一个或多个测试浏览器 - 最近,我们生成了纯 JavaScript 代码,这些代码本应是无害的,但会导致 IE8 中的一般保护错误,以及完全冻结 Safari 的其他代码片段等等。

好吧,我们将用尽可能多的心血、汗水和代码逐项解决每个问题。但我想到的问题是:是否有关于此类浏览器缺陷的知识库?类似于 quirksmode.org 的东西,但有关于如何编写代码以避免杀死我们的浏览器的指南?

谢谢。

编辑精度:并不是说它改变了问题的任何内容,而是我们使用了 jQuery。

During the past few months, I've been working on a large web application. Repeatedly, we've written code that, according to DOM & JS specifications, should work perfectly, but still manages to completely kill one or more of our test browsers -- recently, we produced pure JavaScript code that should have been harmless but causes General Protection Faults in IE8, other pieces of code that completely freeze Safari, etc.

Well, we'll solve each issue, item by item, with as much blood, sweat and code as it takes. But the question I have in mind is the following: is there a knowledge base on such browser frailties? Something comparable to quirksmode.org, but with guidelines on how to code stuff to avoid killing our browsers?

Thanks.

edit Precision: not that it changes anything to the question, but we're using jQuery.

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

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

发布评论

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

评论(2

何止钟意 2024-10-06 21:28:06

您可能已经沿着这条路走下去了,但是大多数主要的库,例如 jQuery原型YUI关闭,或 任何其他人都会遇到大多数这些问题,并且已经为您编写了代码。

You've probably already been down this road, but most of the major libraries like jQuery, Prototype, YUI, Closure, or any of several others are going to have run into most of these issues and coded around them for you already.

子栖 2024-10-06 21:28:06

如果您正在编写手动 DOM/JS,请使用 TJ Crowder 提到的库。这些库解决了 DOM 库之间几乎所有常见的不一致问题,并在顶部创建了一个可用的糖糖 API 层。

我在 之前的回答

If you are writing manual DOM/JS, please use a library as T.J. Crowder mentioned. These libraries solve nearly all the common inconsistencies between DOM libraries and make a usable sugar sweet API layer on top.

I have listed a bunch of websites that document cross-browser bugs in a previous answer.

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