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

Unified Diff: lib/dom/templates/html/impl/impl_Element.darttemplate

Issue 10826146: Move noSuchMethod hook from UnknownElement to Element (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | lib/dom/templates/html/impl/impl_UnknownElement.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/templates/html/impl/impl_Element.darttemplate
diff --git a/lib/dom/templates/html/impl/impl_Element.darttemplate b/lib/dom/templates/html/impl/impl_Element.darttemplate
index 61d282377280d1a561a457c6da7515df696ee224..fc2842d02aec158e2ee99ab902f5c8115768eec6 100644
--- a/lib/dom/templates/html/impl/impl_Element.darttemplate
+++ b/lib/dom/templates/html/impl/impl_Element.darttemplate
@@ -719,9 +719,28 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
() => _window.$dom_getComputedStyle(this, pseudoElement),
new Completer<CSSStyleDeclaration>());
}
+
+ // Hooks to support custom WebComponents.
+ var xtag;
+
+$if DARTIUM
+ noSuchMethod(String name, List args) {
+ if (dynamicUnknownElementDispatcher == null) {
+ throw new NoSuchMethodException(this, name, args);
+ } else {
+ return dynamicUnknownElementDispatcher(this, name, args);
+ }
+ }
+$else
+ // TODO(vsm): Implement noSuchMethod or similar for dart2js.
+$endif
+
$!MEMBERS
}
+// Temporary dispatch hook to support WebComponents.
+Function dynamicUnknownElementDispatcher;
+
final _START_TAG_REGEXP = const RegExp('<(\\w+)');
class _ElementFactoryProvider {
static final _CUSTOM_PARENT_TAG_MAP = const {
« no previous file with comments | « no previous file | lib/dom/templates/html/impl/impl_UnknownElement.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698