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

Issue

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.

Answered By – Alexandre Ardhuin

Answer Checked By – Senaida (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *