Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS3Pie causing startup error

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!

like image 366
Shane Reustle Avatar asked Dec 12 '10 17:12

Shane Reustle


1 Answers

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

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

The CSS3Pie project is an Internet Explorer facility - it only works on IE, and is completely 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.

like image 159
Pointy Avatar answered Sep 18 '22 02:09

Pointy