Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart Exception: Already registered (Polymer) prototype for element x

I've two polymer elements that share the same dart file. In the dart file I declare both the PolymerElement classes.

Until polymer 0.15.0+1 it was working fine. I've updated the project to polymer 0.15.1 and now I get this exception:

Exception: Already registered (Polymer) prototype for element x

Where x is the first polymer.

I think the polymer transformer is trying to register it two times, the first scanning the x polymer html file, the second when scanning the other element html file.

An issue has been open in dart: https://code.google.com/p/dart/issues/detail?id=21332

like image 757
Fedy2 Avatar asked Oct 15 '14 07:10

Fedy2


1 Answers

I don't know about Dart and whatnot, but I had the same error message in my console. Turns out I was still having the noscript attribute in my element declaration, which is wrong if you want to register your element manually. Removing noscript from the element declaration solved the problem.

like image 101
mknaf Avatar answered Nov 17 '22 10:11

mknaf