最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - CSS3Pie causing startup error - Stack Overflow

programmeradmin1浏览0评论

When importing CSS3Pie, I'm getting the following error.

Uncaught TypeError: Object [object DOMWindow] has no method 'attachEvent'

I am using Chrome. Is this possibly something I have caused, or just a bug. Thanks!

When importing CSS3Pie, I'm getting the following error.

Uncaught TypeError: Object [object DOMWindow] has no method 'attachEvent'

I am using Chrome. Is this possibly something I have caused, or just a bug. Thanks!

Share Improve this question asked Dec 12, 2010 at 17:27 Shane ReustleShane Reustle 8,9528 gold badges43 silver badges52 bronze badges 4
  • 1 Why would you be using CSS3Pie in Chrome? – Pointy Commented Dec 12, 2010 at 17:33
  • @ken Using Head.JS @pointy Because Chrome isn't the only browser that will see this page – Shane Reustle Commented Dec 12, 2010 at 17:34
  • ??? PIE is only useful in Internet Explorer. – Pointy Commented Dec 12, 2010 at 17:38
  • @pointy Yes, but I still need to import it, unless I want to make every single rounded corners call in javascript inside a conditional script. – Shane Reustle Commented Dec 12, 2010 at 17:44
Add a ment  | 

1 Answer 1

Reset to default 9

I think you should be importing the "PIE.js" file in an IE-only conditional ment:

<!--[if IE]>
  <script src='PIE.js'></script>
<![endif]-->

The CSS3Pie project is an Internet Explorer facility - it only works on IE, and is pletely useless for all other browsers.

edit — note that this is if you're importing the stuff as a .js file in the first place. As far as I can tell, the CSS3Pie docs all encourage the functionality to be imported via the IE "behavior" CSS attribute. That attribute will just be ignored by Chrome and Firefox and Safari and everything else that's not IE.

发布评论

评论列表(0)

  1. 暂无评论