I spent more time than I care to admit tracking down this one, perhaps this post will save someone else the trouble...
When defining a number of functions in a prototype in JavaScript,
do not include a trailing comma after the last function:
MyType.prototype = {
foo : function() {
// ...
},
bar : function() {
//...
}, //<- fails in IE!
}
What was especially tricky about tracking this problem down was that FireFox works with or without the trailing comma, so it only fails in IE!
Posted
Jun 19 2007, 06:52 AM
by
fritz-onion