当我尝试使用下面的聚合物扩展某些元素时,会出现以下错误消息。
@CustomTag('click-counter')
class ClickCounter extends CanvasElement with Polymer {
// something
}
Breaking on exception: Unsupported operation: Class must provide extendsTag if base native class is not HTMLElement
我该如何解决?
答案 0 :(得分:1)
当您在Dart代码中使用Polymer扩展某个Element时,您还必须将“extends”属性添加到Polymer-element,如下所示,或者您获得Breaking on exception message。
<polymer-element name="click-counter" extends="canvas" attributes="count">
另见Why do I get an Internal Dartium Exception when using custom elements?