| 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:isolate"); | 10 #import("dart:isolate"); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 Element query(String selector) => _document.query(selector); | 61 Element query(String selector) => _document.query(selector); |
| 62 ElementList queryAll(String selector) => _document.queryAll(selector); | 62 ElementList queryAll(String selector) => _document.queryAll(selector); |
| 63 | 63 |
| 64 class _Null { | 64 class _Null { |
| 65 const _Null(); | 65 const _Null(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 final _null = const _Null(); | 68 final _null = const _Null(); |
| 69 | 69 |
| 70 int _getNewIsolateId() { | 70 int _getNewIsolateId() => _Utils._getNewIsolateId(); |
| 71 // TODO(vsm): We need a Dartium native for this. | |
| 72 return 1; | |
| 73 } | |
| 74 | 71 |
| 75 bool _callPortInitialized = false; | 72 bool _callPortInitialized = false; |
| 76 var _callPortLastResult = null; | 73 var _callPortLastResult = null; |
| 77 | 74 |
| 78 _callPortSync(num id, var message) { | 75 _callPortSync(num id, var message) { |
| 79 if (!_callPortInitialized) { | 76 if (!_callPortInitialized) { |
| 80 window.on['js-result'].add((event) { | 77 window.on['js-result'].add((event) { |
| 81 _callPortLastResult = JSON.parse(event.data); | 78 _callPortLastResult = JSON.parse(event.data); |
| 82 }, false); | 79 }, false); |
| 83 _callPortInitialized = true; | 80 _callPortInitialized = true; |
| 84 } | 81 } |
| 85 assert(_callPortLastResult == null); | 82 assert(_callPortLastResult == null); |
| 86 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); | 83 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); |
| 87 var result = _callPortLastResult; | 84 var result = _callPortLastResult; |
| 88 _callPortLastResult = null; | 85 _callPortLastResult = null; |
| 89 return result; | 86 return result; |
| 90 } | 87 } |
| OLD | NEW |