Raphael.Export icon indicating copy to clipboard operation
Raphael.Export copied to clipboard

Error setting class attribute in IE8

Open MarkMaldaba opened this issue 7 years ago • 0 comments

I am getting JavaScript errors in IE8 due to the 'class' attribute ending up undefined in the 'text' callback for the serializer object.

On line 205, the code is populating the 'class' attribute by checking node.node.className.baseVal, however on IE8 this is undefined. This then results in a JavaScript error when escapeXML() attempts to handle this undefined value as a string.

I am going to commit a PR to fix the fact that escapeXML() breaks when it receives an undefined value, but I am also logging this ticket as I think that fix will just be sticking-plaster over the real problem, which is that handling of classes appears to be not working correctly in IE8.

(Note that I haven't checked other IE versions, so this problem may not be confined to IE8.)

MarkMaldaba avatar Mar 05 '18 14:03 MarkMaldaba