| 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). |
| (...skipping 18 matching lines...) Expand all Loading... |
| 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; |
| 33 | 33 |
| 34 import 'dart:async'; | 34 import 'dart:async'; |
| 35 import 'dart:collection'; | 35 import 'dart:collection'; |
| 36 import 'dart:_internal' hide Symbol, deprecated; | 36 import 'dart:_internal' hide Symbol, deprecated; |
| 37 import 'dart:html_common'; | 37 import 'dart:html_common'; |
| 38 import 'dart:indexed_db'; | 38 import 'dart:indexed_db'; |
| 39 import 'dart:indexed_db' show indexed_dbBlinkMap; |
| 39 import 'dart:isolate'; | 40 import 'dart:isolate'; |
| 40 import 'dart:js' as js; | 41 import 'dart:js' as js; |
| 41 import "dart:convert"; | 42 import "dart:convert"; |
| 42 import 'dart:math'; | 43 import 'dart:math'; |
| 43 // TODO(vsm): Remove this when we can do the proper checking in | 44 // TODO(vsm): Remove this when we can do the proper checking in |
| 44 // native code for custom elements. | 45 // native code for custom elements. |
| 45 import 'dart:mirrors'; | 46 import 'dart:mirrors'; |
| 46 import 'dart:nativewrappers'; | 47 import 'dart:nativewrappers'; |
| 47 import 'dart:typed_data'; | 48 import 'dart:typed_data'; |
| 48 import 'dart:web_gl' as gl; | 49 import 'dart:web_gl' as gl; |
| 50 import 'dart:web_gl' show web_glBlinkMap; |
| 49 import 'dart:web_sql'; | 51 import 'dart:web_sql'; |
| 50 // Not actually used, but imported since dart:html can generate these objects. | 52 // Not actually used, but imported since dart:html can generate these objects. |
| 51 import 'dart:svg' as svg; | 53 import 'dart:svg' as svg; |
| 54 import 'dart:svg' show svgBlinkMap; |
| 52 import 'dart:svg' show Matrix; | 55 import 'dart:svg' show Matrix; |
| 53 import 'dart:svg' show SvgSvgElement; | 56 import 'dart:svg' show SvgSvgElement; |
| 54 import 'dart:web_audio' as web_audio; | 57 import 'dart:web_audio' as web_audio; |
| 58 import 'dart:web_audio' show web_audioBlinkMap; |
| 55 $if DART_USE_BLINK | 59 $if DART_USE_BLINK |
| 56 import 'dart:_blink' as _blink; | 60 import 'dart:_blink' as _blink; |
| 57 $endif | 61 $endif |
| 58 | 62 |
| 59 export 'dart:math' show Rectangle, Point; | 63 export 'dart:math' show Rectangle, Point; |
| 60 | 64 |
| 61 $!GENERATED_DART_FILES | 65 $!GENERATED_DART_FILES |
| 62 | 66 |
| 63 // Issue 14721, order important for WrappedEvent. | 67 // Issue 14721, order important for WrappedEvent. |
| 64 part '$AUXILIARY_DIR/AttributeMap.dart'; | 68 part '$AUXILIARY_DIR/AttributeMap.dart'; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // FIXME: Move these to better locations. | 153 // FIXME: Move these to better locations. |
| 150 'DateTime': () => DateTime, | 154 'DateTime': () => DateTime, |
| 151 'JsObject': () => js.JsObject, | 155 'JsObject': () => js.JsObject, |
| 152 'JsFunction': () => js.JsFunction, | 156 'JsFunction': () => js.JsFunction, |
| 153 'JsArray': () => js.JsArray, | 157 'JsArray': () => js.JsArray, |
| 154 $!TYPE_MAP | 158 $!TYPE_MAP |
| 155 // FIXME: Temporary workaround. The Blink name matches the Dart name | 159 // FIXME: Temporary workaround. The Blink name matches the Dart name |
| 156 // post Chrome 35. We still generate the old mapping from 'Clipboard'. | 160 // post Chrome 35. We still generate the old mapping from 'Clipboard'. |
| 157 'DataTransfer': () => DataTransfer, | 161 'DataTransfer': () => DataTransfer, |
| 158 }; | 162 }; |
| 163 |
| 164 // TODO(leafp): We may want to move this elsewhere if html becomes |
| 165 // a package to avoid dartium depending on pkg:html. |
| 166 Type _getType(String key) { |
| 167 var result; |
| 168 |
| 169 // TODO(vsm): Add Cross Frame and JS types here as well. |
| 170 |
| 171 // Check the html library. |
| 172 result = _getHtmlType(key); |
| 173 if (result != null) { |
| 174 return result; |
| 175 } |
| 176 |
| 177 // Check the web gl library. |
| 178 result = _getWebGlType(key); |
| 179 if (result != null) { |
| 180 return result; |
| 181 } |
| 182 |
| 183 // Check the indexed db library. |
| 184 result = _getIndexDbType(key); |
| 185 if (result != null) { |
| 186 return result; |
| 187 } |
| 188 |
| 189 // Check the web audio library. |
| 190 result = _getWebAudioType(key); |
| 191 if (result != null) { |
| 192 return result; |
| 193 } |
| 194 |
| 195 // Check the web sql library. |
| 196 result = _getWebSqlType(key); |
| 197 if (result != null) { |
| 198 return result; |
| 199 } |
| 200 |
| 201 // Check the svg library. |
| 202 result = _getSvgType(key); |
| 203 if (result != null) { |
| 204 return result; |
| 205 } |
| 206 |
| 207 return null; |
| 208 } |
| 209 |
| 210 Type _getHtmlType(String key) { |
| 211 if (htmlBlinkMap.containsKey(key)) { |
| 212 return htmlBlinkMap[key](); |
| 213 } |
| 214 return null; |
| 215 } |
| 216 |
| 217 Type _getWebGlType(String key) { |
| 218 if (web_glBlinkMap.containsKey(key)) { |
| 219 return web_glBlinkMap[key](); |
| 220 } |
| 221 return null; |
| 222 } |
| 223 |
| 224 Type _getIndexDbType(String key) { |
| 225 if (indexed_dbBlinkMap.containsKey(key)) { |
| 226 return indexed_dbBlinkMap[key](); |
| 227 } |
| 228 return null; |
| 229 } |
| 230 |
| 231 Type _getWebAudioType(String key) { |
| 232 if (web_audioBlinkMap.containsKey(key)) { |
| 233 return web_audioBlinkMap[key](); |
| 234 } |
| 235 return null; |
| 236 } |
| 237 |
| 238 Type _getWebSqlType(String key) { |
| 239 if (web_sqlBlinkMap.containsKey(key)) { |
| 240 return web_sqlBlinkMap[key](); |
| 241 } |
| 242 return null; |
| 243 } |
| 244 |
| 245 Type _getSvgType(String key) { |
| 246 if (svgBlinkMap.containsKey(key)) { |
| 247 return svgBlinkMap[key](); |
| 248 } |
| 249 return null; |
| 250 } |
| 251 |
| 159 $endif | 252 $endif |
| OLD | NEW |