views:

1927

answers:

4

I'm hitting this error and I'm not really sure why. I have a minified version of excanvas.js and something is breaking in IE, specifically on:

var b=a.createStyleSheet();

I'm not sure why. Does anyone have any insight? I can provide more information, I'm just not sure what information will help.

A: 

Does your HTML validate?

Joe W.
A: 

First thing I'd do is use the un-minified version. Looks like this coming from an init function called from onreadystatechange, trying to style canvas elements, although that isn't as enlightening as one might hope.

Justin Love
+2  A: 

This is a slightly old thread, but I thought it would be useful to post. There seems to be a limitation on how much style information a page can contain, which causes this error in IE6. I am able to produce an invalid argument error using this simple test page:

<html>
<head>
<title></title>
<script>
for(var i=0;i<32;i++) {
document.createStyleSheet();
}
</script>
</head>
<body>
</body>
</html>

I think this is the source of the problem. HTH, Russell

This is the correct answer
Sebastian Good
This is not the required solution for this question
Saeros
A: 

The newest version of excanvas fixes this for me. You can always get the newest version from svn trunk.

Mike Gardiner