Index: lib/custom_element_proxy.dart |
diff --git a/lib/custom_element_proxy.dart b/lib/custom_element_proxy.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c9a72f75054175a44f265f3b8cc0d2fd615f19a7 |
--- /dev/null |
+++ b/lib/custom_element_proxy.dart |
@@ -0,0 +1,18 @@ |
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+import 'package:initialize/initialize.dart'; |
+import 'interop.dart'; |
+ |
+/// Annotation for a dart class which proxies a javascript custom element. |
+/// This will not work unless `interop_support.js` is loaded. |
Siggi Cherem (dart-lang)
2015/01/20 22:48:20
Ohh - it might be worth adding a TODO for this. In
jakemac
2015/01/21 18:04:30
Good point, I like the idea of just moving it to a
|
+class CustomElementProxy implements Initializer<Type> { |
+ final String tagName; |
+ final String extendsTag; |
+ |
+ const CustomElementProxy(this.tagName, {this.extendsTag}); |
+ |
+ void initialize(Type t) { |
+ registerDartType(tagName, t, extendsTag: extendsTag); |
+ } |
+} |