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 library html; | 8 library html; |
9 | 9 |
10 import 'dart:async'; | 10 import 'dart:async'; |
(...skipping 29 matching lines...) Expand all Loading... |
40 part '$AUXILIARY_DIR/Isolates.dart'; | 40 part '$AUXILIARY_DIR/Isolates.dart'; |
41 part '$AUXILIARY_DIR/Microtask.dart'; | 41 part '$AUXILIARY_DIR/Microtask.dart'; |
42 part '$AUXILIARY_DIR/Serialization.dart'; | 42 part '$AUXILIARY_DIR/Serialization.dart'; |
43 part '$AUXILIARY_DIR/shared_FactoryProviders.dart'; | 43 part '$AUXILIARY_DIR/shared_FactoryProviders.dart'; |
44 part '$AUXILIARY_DIR/dart2js_Conversions.dart'; | 44 part '$AUXILIARY_DIR/dart2js_Conversions.dart'; |
45 part '$AUXILIARY_DIR/dart2js_DOMImplementation.dart'; | 45 part '$AUXILIARY_DIR/dart2js_DOMImplementation.dart'; |
46 part '$AUXILIARY_DIR/dart2js_KeyEvent.dart'; | 46 part '$AUXILIARY_DIR/dart2js_KeyEvent.dart'; |
47 part '$AUXILIARY_DIR/dart2js_FactoryProviders.dart'; | 47 part '$AUXILIARY_DIR/dart2js_FactoryProviders.dart'; |
48 part '$AUXILIARY_DIR/dart2js_LocationWrapper.dart'; | 48 part '$AUXILIARY_DIR/dart2js_LocationWrapper.dart'; |
49 part '$AUXILIARY_DIR/dart2js_TypedArrayFactoryProvider.dart'; | 49 part '$AUXILIARY_DIR/dart2js_TypedArrayFactoryProvider.dart'; |
50 part '$AUXILIARY_DIR/_Testing.dart'; | |
51 part '$AUXILIARY_DIR/_ListIterators.dart'; | 50 part '$AUXILIARY_DIR/_ListIterators.dart'; |
52 | 51 |
53 | 52 |
54 Window get window => JS('Window', 'window'); | 53 Window get window => JS('Window', 'window'); |
55 | 54 |
56 HtmlDocument get document => JS('Document', 'document'); | 55 HtmlDocument get document => JS('Document', 'document'); |
57 | 56 |
58 Element query(String selector) => document.query(selector); | 57 Element query(String selector) => document.query(selector); |
59 List<Element> queryAll(String selector) => document.queryAll(selector); | 58 List<Element> queryAll(String selector) => document.queryAll(selector); |
60 | 59 |
61 // Workaround for tags like <cite> that lack their own Element subclass -- | 60 // Workaround for tags like <cite> that lack their own Element subclass -- |
62 // Dart issue 1990. | 61 // Dart issue 1990. |
63 class _HTMLElement extends Element native "*HTMLElement" { | 62 class _HTMLElement extends Element native "*HTMLElement" { |
64 } | 63 } |
65 | 64 |
66 // Support for Send/ReceivePortSync. | 65 // Support for Send/ReceivePortSync. |
67 int _getNewIsolateId() { | 66 int _getNewIsolateId() { |
68 if (JS('bool', r'!window.$dart$isolate$counter')) { | 67 if (JS('bool', r'!window.$dart$isolate$counter')) { |
69 JS('void', r'window.$dart$isolate$counter = 1'); | 68 JS('void', r'window.$dart$isolate$counter = 1'); |
70 } | 69 } |
71 return JS('int', r'window.$dart$isolate$counter++'); | 70 return JS('int', r'window.$dart$isolate$counter++'); |
72 } | 71 } |
73 | 72 |
74 // Fast path to invoke JS send port. | 73 // Fast path to invoke JS send port. |
75 _callPortSync(int id, message) { | 74 _callPortSync(int id, message) { |
76 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); | 75 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); |
77 } | 76 } |
78 | 77 |
79 spawnDomFunction(f) => IsolateNatives.spawnDomFunction(f); | 78 spawnDomFunction(f) => IsolateNatives.spawnDomFunction(f); |
OLD | NEW |