Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Unified Diff: pkg/polymer/lib/src/instance.dart

Issue 37793004: Switch to lookup declaration by tag name. This fixes issue 14274. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/polymer/lib/src/instance.dart
diff --git a/pkg/polymer/lib/src/instance.dart b/pkg/polymer/lib/src/instance.dart
index 815c6bdf49c9b9cd6aa72b166628850cd05fe558..bad036cbb3ead4d428a7fff0cbb6c8cd29b81382 100644
--- a/pkg/polymer/lib/src/instance.dart
+++ b/pkg/polymer/lib/src/instance.dart
@@ -134,9 +134,15 @@ abstract class Polymer implements Element, Observable, NodeBindExtension {
}
}
+ /** Retrieves the custom element name by inspecting the host node. */
+ String get _customTagName {
+ var isAttr = attributes['is'];
+ return (isAttr == null || isAttr == '') ? localName : isAttr;
+ }
+
void prepareElement() {
// Dart note: get the _declaration, which also marks _elementPrepared
- _declaration = _getDeclaration(this.runtimeType);
+ _declaration = _getDeclaration(_customTagName);
// do this first so we can observe changes during initialization
observeProperties();
// install boilerplate attributes

Powered by Google App Engine
This is Rietveld 408576698