OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library polymer.polymer_element; | 5 library polymer.polymer_element; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'dart:mirrors'; | 9 import 'dart:mirrors'; |
10 | 10 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 if (propObserver != null) { | 167 if (propObserver != null) { |
168 return new _PolymerBinding(this, name, model, path, propObserver); | 168 return new _PolymerBinding(this, name, model, path, propObserver); |
169 } | 169 } |
170 return super.createBinding(name, model, path); | 170 return super.createBinding(name, model, path); |
171 } | 171 } |
172 | 172 |
173 /** | 173 /** |
174 * Using Polymer's platform/src/ShadowCSS.js passing the style tag's content. | 174 * Using Polymer's platform/src/ShadowCSS.js passing the style tag's content. |
175 */ | 175 */ |
176 void _shimCss(ShadowRoot root, String localName, String extendsName) { | 176 void _shimCss(ShadowRoot root, String localName, String extendsName) { |
177 var platform = js.context.Platform; | 177 // TODO(terry): Remove warning, cast js.context to dynamic because of bug |
| 178 // https://code.google.com/p/dart/issues/detail?id=6111. The |
| 179 // js interop package will be patching this until bug is fixed. |
| 180 var platform = (js.context as dynamic).Platform; |
178 if (platform == null) return; | 181 if (platform == null) return; |
179 var shadowCss = platform.ShadowCSS; | 182 var shadowCss = platform.ShadowCSS; |
180 if (shadowCss == null) return; | 183 if (shadowCss == null) return; |
181 | 184 |
182 // TODO(terry): Remove calls to shimShadowDOMStyling2 and replace with | 185 // TODO(terry): Remove calls to shimShadowDOMStyling2 and replace with |
183 // shimShadowDOMStyling when we support unwrapping dart:html | 186 // shimShadowDOMStyling when we support unwrapping dart:html |
184 // Element to a JS DOM node. | 187 // Element to a JS DOM node. |
185 var shimShadowDOMStyling2 = shadowCss.shimShadowDOMStyling2; | 188 var shimShadowDOMStyling2 = shadowCss.shimShadowDOMStyling2; |
186 if (shimShadowDOMStyling2 == null) return; | 189 if (shimShadowDOMStyling2 == null) return; |
187 var style = root.query('style'); | 190 var style = root.query('style'); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 'onKeyMessage': MediaElement.keyMessageEvent, | 546 'onKeyMessage': MediaElement.keyMessageEvent, |
544 'onNeedKey': MediaElement.needKeyEvent, | 547 'onNeedKey': MediaElement.needKeyEvent, |
545 'onWebGlContextLost': CanvasElement.webGlContextLostEvent, | 548 'onWebGlContextLost': CanvasElement.webGlContextLostEvent, |
546 'onWebGlContextRestored': CanvasElement.webGlContextRestoredEvent, | 549 'onWebGlContextRestored': CanvasElement.webGlContextRestoredEvent, |
547 'onPointerLockChange': Document.pointerLockChangeEvent, | 550 'onPointerLockChange': Document.pointerLockChangeEvent, |
548 'onPointerLockError': Document.pointerLockErrorEvent, | 551 'onPointerLockError': Document.pointerLockErrorEvent, |
549 'onReadyStateChange': Document.readyStateChangeEvent, | 552 'onReadyStateChange': Document.readyStateChangeEvent, |
550 'onSelectionChange': Document.selectionChangeEvent, | 553 'onSelectionChange': Document.selectionChangeEvent, |
551 'onSecurityPolicyViolation': Document.securityPolicyViolationEvent, | 554 'onSecurityPolicyViolation': Document.securityPolicyViolationEvent, |
552 }; | 555 }; |
OLD | NEW |