Skip to content

Error on SVG elements in widget_starter #92

@valentinzberea

Description

@valentinzberea

An exception is thrown on this line: https://github.com/uberVU/mozaic/blob/master/core/widget_starter.coffee#L77
when you have SVG elements in DOM.

It seems to be quite common:
http://stackoverflow.com/questions/12588913/svganimatedstring-missing-method-indexof

The fix would be that instead of:

el.className

to use

if el.className.baseVal? then el.className.baseVal else el.className

like in this fix from d3.js: https://github.com/jasondavies/d3/commit/7ab5e3567f6c5976c90e30d13e5b6ee3890590f1

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions