Index: pkg/polymer/lib/src/declaration.dart |
diff --git a/pkg/polymer/lib/src/declaration.dart b/pkg/polymer/lib/src/declaration.dart |
index 72458c85229f5c59898f7a4a4dc06ba061a2bc7b..7e6be8220decb54022c31c5223e16437a567cd80 100644 |
--- a/pkg/polymer/lib/src/declaration.dart |
+++ b/pkg/polymer/lib/src/declaration.dart |
@@ -172,7 +172,7 @@ class PolymerDeclaration extends HtmlElement { |
_shimShadowDomStyling(templateContent, name); |
// register our custom element |
- registerType(name, extendsTag: extendee); |
+ registerType(name); |
// NOTE: skip in Dart because we don't have mutable global scope. |
// reference constructor in a global named by 'constructor' attribute |
@@ -234,10 +234,15 @@ class PolymerDeclaration extends HtmlElement { |
} |
- void registerType(String name, {String extendsTag}) { |
+ void registerType(String name) { |
Jennifer Messerly
2013/10/22 21:41:47
retroactive question: why don't we pass in "extend
|
+ var baseTag; |
+ var decl = this; |
+ while (decl != null) { |
+ baseTag = decl.attributes['extends']; |
+ decl = decl.superDeclaration; |
+ } |
// native element must be specified in extends |
- var nativeExtends = (extendsTag != null && !extendsTag.contains('-')) ? |
- extendsTag : null; |
+ var nativeExtends = baseTag; |
Siggi Cherem (dart-lang)
2013/10/22 16:44:17
nit: merge baseTag or nativeExtends to use a singl
|
document.register(name, type, extendsTag: nativeExtends); |
} |