6

I'm trying to understand why Css3Pie used in conjunction with Prototype 1.6.1 crashes Internet Explorer 8. Why is this happening?

Relevant information

  • CSS3Pie [source code] is an Internet Explorer behavior (htc) that adds support for CSS3 properties like border-radius, gradients, etc.
  • The crash only happens in IE8, not IE7 or earlier.
  • The crash only happens in Prototype 1.6.1 [source code], not Prototype 1.6.0.x
  • The crash happens immediately on page load, I'm not even able to interact with the page.
  • The developer is aware of the issue but since he believes it is a Prototype issue (it may be), he may not be eager to fix it. There is both a forum post and GitHub bug report, but neither add much information.
4

2 に答える 2

5

最近の Windows アップデートで修正されたように見えるこのIE8 クラッシュは、Prototype が DOM オブジェクト プロトタイプをいじくり回した後、CSS3Pie の動作を適用したことによって引き起こされました。Protoype 1.6.1 では、Prototype.BrowserFeatures オブジェクトで ElementExtensions と SpecificElementExtensions を false に設定し、すぐに true を返すように checkDeficiency 関数を変更することで回避できます。

于 2011-01-21T00:04:29.483 に答える
1

これは良いスタートですが、他のブラウザー (つまり、firefox、chrome) では動作しなくなります。代わりに、各関数 (ElementExtensions、SpecificElementExtensions、checkDeficiency) の先頭に IE 8 のチェックを追加してから、拡張機能の匿名関数に対して false を返し、checkDeficiency 関数に対して true を返す必要があります。

ElementExtensions: (function() {
 if (isIE8) return false;
...

SpecificElementExtensions: (function() {
 if (isIE8) return false;
...

function checkDeficiency(tagName) {
 if (isIE8) return true;
...

var isIE8 = (function(){
    return ((navigator.userAgent.indexOf('MSIE')!=-1) && (document.documentMode==8));
})();
于 2012-05-23T20:19:51.717 に答える