Search code examples
svgdartdart-editordart2js

dart2js: Uncaught TypeError: Object #<SVGAnimatedString> has no method 'split'


I'm working on simple online building planner tool, which uses svg element (dart:svg library) as editor canvas. Development build works perfect in native Dartium VM, but after running dart2js I'm getting next error in any browser:

Uncaught TypeError: Object #<SVGAnimatedString> has no method 'split' 

Dart does't show any error while compiling to js. Error appears right after DOM loaded, so could it be dart2js translator issue?

Thanks in advance!


Solution

  • AnimatedString does not have a split method.

    Perhaps you are facing Issue 15787: className instance variable of SvgElement is an SVGAnimatedString instead of a string in dart2js.