| 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 /// The Dart HTML library. |
| 8 library dart.dom.html; | 9 library dart.dom.html; |
| 9 | 10 |
| 10 import 'dart:async'; | 11 import 'dart:async'; |
| 11 import 'dart:collection'; | 12 import 'dart:collection'; |
| 12 import 'dart:html_common'; | 13 import 'dart:html_common'; |
| 13 import 'dart:indexed_db'; | 14 import 'dart:indexed_db'; |
| 14 import 'dart:isolate'; | 15 import 'dart:isolate'; |
| 15 import 'dart:json' as json; | 16 import 'dart:json' as json; |
| 16 import 'dart:math'; | 17 import 'dart:math'; |
| 17 // Not actually used, but imported since dart:html can generate these objects. | 18 // Not actually used, but imported since dart:html can generate these objects. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 42 part '$AUXILIARY_DIR/shared_FactoryProviders.dart'; | 43 part '$AUXILIARY_DIR/shared_FactoryProviders.dart'; |
| 43 part '$AUXILIARY_DIR/dart2js_Conversions.dart'; | 44 part '$AUXILIARY_DIR/dart2js_Conversions.dart'; |
| 44 part '$AUXILIARY_DIR/dart2js_DOMImplementation.dart'; | 45 part '$AUXILIARY_DIR/dart2js_DOMImplementation.dart'; |
| 45 part '$AUXILIARY_DIR/dart2js_KeyEvent.dart'; | 46 part '$AUXILIARY_DIR/dart2js_KeyEvent.dart'; |
| 46 part '$AUXILIARY_DIR/dart2js_FactoryProviders.dart'; | 47 part '$AUXILIARY_DIR/dart2js_FactoryProviders.dart'; |
| 47 part '$AUXILIARY_DIR/dart2js_LocationWrapper.dart'; | 48 part '$AUXILIARY_DIR/dart2js_LocationWrapper.dart'; |
| 48 part '$AUXILIARY_DIR/dart2js_TypedArrayFactoryProvider.dart'; | 49 part '$AUXILIARY_DIR/dart2js_TypedArrayFactoryProvider.dart'; |
| 49 part '$AUXILIARY_DIR/_ListIterators.dart'; | 50 part '$AUXILIARY_DIR/_ListIterators.dart'; |
| 50 | 51 |
| 51 | 52 |
| 53 /** |
| 54 * The top-level Window object. |
| 55 */ |
| 52 Window get window => JS('Window', 'window'); | 56 Window get window => JS('Window', 'window'); |
| 53 | 57 |
| 58 /** |
| 59 * The top-level Document object. |
| 60 */ |
| 54 HtmlDocument get document => JS('Document', 'document'); | 61 HtmlDocument get document => JS('Document', 'document'); |
| 55 | 62 |
| 56 Element query(String selector) => document.query(selector); | 63 Element query(String selector) => document.query(selector); |
| 57 List<Element> queryAll(String selector) => document.queryAll(selector); | 64 List<Element> queryAll(String selector) => document.queryAll(selector); |
| 58 | 65 |
| 59 // Workaround for tags like <cite> that lack their own Element subclass -- | 66 // Workaround for tags like <cite> that lack their own Element subclass -- |
| 60 // Dart issue 1990. | 67 // Dart issue 1990. |
| 61 class _HTMLElement extends Element native "*HTMLElement" { | 68 class _HTMLElement extends Element native "*HTMLElement" { |
| 62 } | 69 } |
| 63 | 70 |
| 64 // Support for Send/ReceivePortSync. | 71 // Support for Send/ReceivePortSync. |
| 65 int _getNewIsolateId() { | 72 int _getNewIsolateId() { |
| 66 if (JS('bool', r'!window.$dart$isolate$counter')) { | 73 if (JS('bool', r'!window.$dart$isolate$counter')) { |
| 67 JS('void', r'window.$dart$isolate$counter = 1'); | 74 JS('void', r'window.$dart$isolate$counter = 1'); |
| 68 } | 75 } |
| 69 return JS('int', r'window.$dart$isolate$counter++'); | 76 return JS('int', r'window.$dart$isolate$counter++'); |
| 70 } | 77 } |
| 71 | 78 |
| 72 // Fast path to invoke JS send port. | 79 // Fast path to invoke JS send port. |
| 73 _callPortSync(int id, message) { | 80 _callPortSync(int id, message) { |
| 74 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); | 81 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); |
| 75 } | 82 } |
| 76 | 83 |
| 77 spawnDomFunction(f) => IsolateNatives.spawnDomFunction(f); | 84 spawnDomFunction(f) => IsolateNatives.spawnDomFunction(f); |
| OLD | NEW |