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

Unified Diff: lib/src/dom_proxy_mixin.dart

Issue 1091903002: Move DomProxyMixin to this package (Closed) Base URL: git@github.com:dart-lang/web-components.git@master
Patch Set: Created 5 years, 8 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: lib/src/dom_proxy_mixin.dart
diff --git a/lib/src/dom_proxy_mixin.dart b/lib/src/dom_proxy_mixin.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7210a53935636dba351e69c0118c5c156f680914
--- /dev/null
+++ b/lib/src/dom_proxy_mixin.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2014, 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.
+library web_components.src.dom_proxy_mixin;
+
+import 'dart:js' as js;
+
+/// A simple mixin to make it easier to interoperate with the Javascript API of
+/// a browser object. This is mainly used by classes that expose a Dart API for
+/// Javascript custom elements.
+class DomProxyMixin {
+ js.JsObject _proxy;
+ js.JsObject get jsElement {
+ if (_proxy == null) {
+ _proxy = new js.JsObject.fromBrowserObject(this);
+ }
+ return _proxy;
+ }
+}
« no previous file with comments | « CHANGELOG.md ('k') | lib/web_components.dart » ('j') | lib/web_components.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698