| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 part '$AUXILIARY_DIR/NodeValidatorBuilder.dart'; | 73 part '$AUXILIARY_DIR/NodeValidatorBuilder.dart'; |
| 74 part '$AUXILIARY_DIR/ReadyState.dart'; | 74 part '$AUXILIARY_DIR/ReadyState.dart'; |
| 75 part '$AUXILIARY_DIR/Serialization.dart'; | 75 part '$AUXILIARY_DIR/Serialization.dart'; |
| 76 part '$AUXILIARY_DIR/Validators.dart'; | 76 part '$AUXILIARY_DIR/Validators.dart'; |
| 77 part '$AUXILIARY_DIR/WrappedEvent.dart'; | 77 part '$AUXILIARY_DIR/WrappedEvent.dart'; |
| 78 part '$AUXILIARY_DIR/WrappedList.dart'; | 78 part '$AUXILIARY_DIR/WrappedList.dart'; |
| 79 part '$AUXILIARY_DIR/_HttpRequestUtils.dart'; | 79 part '$AUXILIARY_DIR/_HttpRequestUtils.dart'; |
| 80 part '$AUXILIARY_DIR/_ListIterators.dart'; | 80 part '$AUXILIARY_DIR/_ListIterators.dart'; |
| 81 part '$AUXILIARY_DIR/dartium_KeyEvent.dart'; | 81 part '$AUXILIARY_DIR/dartium_KeyEvent.dart'; |
| 82 part '$AUXILIARY_DIR/dartium_Platform.dart'; | 82 part '$AUXILIARY_DIR/dartium_Platform.dart'; |
| 83 part '$AUXILIARY_DIR/shared_html.dart'; | |
| 84 | 83 |
| 85 part '$AUXILIARY_DIR/native_DOMImplementation.dart'; | 84 part '$AUXILIARY_DIR/native_DOMImplementation.dart'; |
| 86 | 85 |
| 87 Window _window; | 86 Window _window; |
| 88 | 87 |
| 89 /** | 88 /** |
| 90 * Top-level container for a web page, which is usually a browser tab or window. | 89 * Top-level container for a web page, which is usually a browser tab or window. |
| 91 * | 90 * |
| 92 * Each web page loaded in the browser has its own [Window], which is a | 91 * Each web page loaded in the browser has its own [Window], which is a |
| 93 * container for the web page. | 92 * container for the web page. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 113 * Root node for all content in a web page. | 112 * Root node for all content in a web page. |
| 114 */ | 113 */ |
| 115 HtmlDocument get document { | 114 HtmlDocument get document { |
| 116 if (_document != null) { | 115 if (_document != null) { |
| 117 return _document; | 116 return _document; |
| 118 } | 117 } |
| 119 _document = window.document; | 118 _document = window.document; |
| 120 return _document; | 119 return _document; |
| 121 } | 120 } |
| 122 | 121 |
| 122 |
| 123 Element query(String selector) => document.query(selector); |
| 124 ElementList queryAll(String selector) => document.queryAll(selector); |
| 125 |
| 123 int _getNewIsolateId() => _Utils._getNewIsolateId(); | 126 int _getNewIsolateId() => _Utils._getNewIsolateId(); |
| 124 | 127 |
| 125 bool _callPortInitialized = false; | 128 bool _callPortInitialized = false; |
| 126 var _callPortLastResult = null; | 129 var _callPortLastResult = null; |
| 127 | 130 |
| 128 _callPortSync(num id, var message) { | 131 _callPortSync(num id, var message) { |
| 129 if (!_callPortInitialized) { | 132 if (!_callPortInitialized) { |
| 130 window.on['js-result'].listen((event) { | 133 window.on['js-result'].listen((event) { |
| 131 _callPortLastResult = JSON.decode(_getPortSyncEventData(event)); | 134 _callPortLastResult = JSON.decode(_getPortSyncEventData(event)); |
| 132 }); | 135 }); |
| 133 _callPortInitialized = true; | 136 _callPortInitialized = true; |
| 134 } | 137 } |
| 135 assert(_callPortLastResult == null); | 138 assert(_callPortLastResult == null); |
| 136 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); | 139 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); |
| 137 var result = _callPortLastResult; | 140 var result = _callPortLastResult; |
| 138 _callPortLastResult = null; | 141 _callPortLastResult = null; |
| 139 return result; | 142 return result; |
| 140 } | 143 } |
| OLD | NEW |