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