| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 // DO NOT EDIT | |
| 6 // Auto-generated dart:html library. | |
| 7 | |
| 8 #library("dart:html"); | |
| 9 | |
| 10 #import("dart:isolate"); | |
| 11 #import("dart:json"); | |
| 12 #import("dart:nativewrappers"); | |
| 13 | |
| 14 $!GENERATED_DART_FILES | |
| 15 | |
| 16 #source('$AUXILIARY_DIR/EventListener.dart'); | |
| 17 #source('$AUXILIARY_DIR/KeyLocation.dart'); | |
| 18 #source('$AUXILIARY_DIR/KeyName.dart'); | |
| 19 #source('$AUXILIARY_DIR/ReadyState.dart'); | |
| 20 #source('$AUXILIARY_DIR/Timer.dart'); | |
| 21 #source('$AUXILIARY_DIR/_Collections.dart'); | |
| 22 #source('$AUXILIARY_DIR/_HttpRequestUtils.dart'); | |
| 23 #source('$AUXILIARY_DIR/../../html/src/shared_FactoryProviders.dart'); | |
| 24 #source('$AUXILIARY_DIR/../../html/src/dartium_FactoryProviders.dart'); | |
| 25 #source('$AUXILIARY_DIR/../../html/src/Device.dart'); | |
| 26 #source('$AUXILIARY_DIR/../../html/src/Isolates.dart'); | |
| 27 #source('$AUXILIARY_DIR/../../html/src/Measurement.dart'); | |
| 28 #source('$AUXILIARY_DIR/../../html/src/Serialization.dart'); | |
| 29 #source('$AUXILIARY_DIR/../../html/src/_Testing.dart'); | |
| 30 #source('$AUXILIARY_DIR/_ListIterators.dart'); | |
| 31 #source('$AUXILIARY_DIR/_Lists.dart'); | |
| 32 | |
| 33 #source('$AUXILIARY_DIR/native_DOMPublic.dart'); | |
| 34 #source('$AUXILIARY_DIR/native_DOMImplementation.dart'); | |
| 35 | |
| 36 Window __window; | |
| 37 | |
| 38 Window get window() { | |
| 39 if (__window !== null) { | |
| 40 return __window; | |
| 41 } | |
| 42 __window = _Utils.window(); | |
| 43 return __window; | |
| 44 } | |
| 45 | |
| 46 Window get _window() native "Utils_window"; | |
| 47 | |
| 48 Document __document; | |
| 49 | |
| 50 Document get document() { | |
| 51 if (__document !== null) { | |
| 52 return __document; | |
| 53 } | |
| 54 __document = _document; | |
| 55 return __document; | |
| 56 } | |
| 57 | |
| 58 Document get _document() => _window.document; | |
| 59 | |
| 60 Element query(String selector) => _document.query(selector); | |
| 61 ElementList queryAll(String selector) => _document.queryAll(selector); | |
| 62 | |
| 63 class _Null { | |
| 64 const _Null(); | |
| 65 } | |
| 66 | |
| 67 final _null = const _Null(); | |
| 68 | |
| 69 int _getNewIsolateId() => _Utils._getNewIsolateId(); | |
| 70 | |
| 71 bool _callPortInitialized = false; | |
| 72 var _callPortLastResult = null; | |
| 73 | |
| 74 _callPortSync(num id, var message) { | |
| 75 if (!_callPortInitialized) { | |
| 76 window.on['js-result'].add((event) { | |
| 77 _callPortLastResult = JSON.parse(event.data); | |
| 78 }, false); | |
| 79 _callPortInitialized = true; | |
| 80 } | |
| 81 assert(_callPortLastResult == null); | |
| 82 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); | |
| 83 var result = _callPortLastResult; | |
| 84 _callPortLastResult = null; | |
| 85 return result; | |
| 86 } | |
| OLD | NEW |