OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 library web_components.src.dom_proxy_mixin; |
| 5 |
| 6 import 'dart:js' as js; |
| 7 |
| 8 /// A simple mixin to make it easier to interoperate with the Javascript API of |
| 9 /// a browser object. This is mainly used by classes that expose a Dart API for |
| 10 /// Javascript custom elements. |
| 11 class DomProxyMixin { |
| 12 js.JsObject _proxy; |
| 13 js.JsObject get jsElement { |
| 14 if (_proxy == null) { |
| 15 _proxy = new js.JsObject.fromBrowserObject(this); |
| 16 } |
| 17 return _proxy; |
| 18 } |
| 19 } |
OLD | NEW |