| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // DO NOT EDIT | 5 // DO NOT EDIT |
| 6 // Auto-generated dart:html library. | 6 // Auto-generated dart:html library. |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * HTML elements and other resources for web-based applications that need to | 9 * HTML elements and other resources for web-based applications that need to |
| 10 * interact with the browser and the DOM (Document Object Model). | 10 * interact with the browser and the DOM (Document Object Model). |
| 11 * | 11 * |
| 12 * This library includes DOM element types, CSS styling, local storage, | 12 * This library includes DOM element types, CSS styling, local storage, |
| 13 * media, speech, events, and more. | 13 * media, speech, events, and more. |
| 14 * To get started, | 14 * To get started, |
| 15 * check out the [Element] class, the base class for many of the HTML | 15 * check out the [Element] class, the base class for many of the HTML |
| 16 * DOM types. | 16 * DOM types. |
| 17 * | 17 * |
| 18 * ## Other resources | 18 * ## Other resources |
| 19 * | 19 * |
| 20 * * If you've never written a web app before, try our | 20 * * If you've never written a web app before, try our |
| 21 * tutorials—[A Game of Darts](http://dartlang.org/docs/tutorials). | 21 * tutorials—[A Game of Darts](http://dartlang.org/docs/tutorials). |
| 22 * | 22 * |
| 23 * * To see some web-based Dart apps in action and to play with the code, | 23 * * To see some web-based Dart apps in action and to play with the code, |
| 24 * download | 24 * download |
| 25 * [Dart Editor](http://www.dartlang.org/#get-started) | 25 * [Dart Editor](http://www.dartlang.org/#get-started) |
| 26 * and run its built-in examples. | 26 * and run its built-in examples. |
| 27 * | 27 * |
| 28 * * For even more examples, see | 28 * * For even more examples, see |
| 29 * [Dart HTML5 Samples](https://github.com/dart-lang/dart-html5-samples) | 29 * [Dart HTML5 Samples](https://github.com/dart-lang/dart-html5-samples) |
| 30 * on Github. | 30 * on Github. |
| 31 */ | 31 */ |
| 32 library dart.dom.html; | 32 library dart.dom.html; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 _callPortLastResult = JSON.decode(_getPortSyncEventData(event)); | 134 _callPortLastResult = JSON.decode(_getPortSyncEventData(event)); |
| 135 }); | 135 }); |
| 136 _callPortInitialized = true; | 136 _callPortInitialized = true; |
| 137 } | 137 } |
| 138 assert(_callPortLastResult == null); | 138 assert(_callPortLastResult == null); |
| 139 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); | 139 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); |
| 140 var result = _callPortLastResult; | 140 var result = _callPortLastResult; |
| 141 _callPortLastResult = null; | 141 _callPortLastResult = null; |
| 142 return result; | 142 return result; |
| 143 } | 143 } |
| 144 |
| 145 _wrapZone(callback) { |
| 146 // For performance reasons avoid wrapping if we are in the root zone. |
| 147 if (Zone.current == Zone.ROOT) return callback; |
| 148 return Zone.current.bindUnaryCallback(callback, runGuarded: true); |
| 149 } |
| OLD | NEW |