开发者

Avoiding messy browser's death

开发者 https://www.devze.com 2023-01-22 22:57 出处:网络
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 c

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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号