| 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 dart.dom.html; | 8 library dart.dom.html; |
| 9 | 9 |
| 10 import 'dart:async'; | 10 import 'dart:async'; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 int _getNewIsolateId() => _Utils._getNewIsolateId(); | 71 int _getNewIsolateId() => _Utils._getNewIsolateId(); |
| 72 | 72 |
| 73 bool _callPortInitialized = false; | 73 bool _callPortInitialized = false; |
| 74 var _callPortLastResult = null; | 74 var _callPortLastResult = null; |
| 75 | 75 |
| 76 _callPortSync(num id, var message) { | 76 _callPortSync(num id, var message) { |
| 77 if (!_callPortInitialized) { | 77 if (!_callPortInitialized) { |
| 78 window.on['js-result'].listen((event) { | 78 window.on['js-result'].listen((event) { |
| 79 _callPortLastResult = json.parse(_getPortSyncEventData(event)); | 79 _callPortLastResult = json.parse(_getPortSyncEventData(event)); |
| 80 }, false); | 80 }); |
| 81 _callPortInitialized = true; | 81 _callPortInitialized = true; |
| 82 } | 82 } |
| 83 assert(_callPortLastResult == null); | 83 assert(_callPortLastResult == null); |
| 84 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); | 84 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); |
| 85 var result = _callPortLastResult; | 85 var result = _callPortLastResult; |
| 86 _callPortLastResult = null; | 86 _callPortLastResult = null; |
| 87 return result; | 87 return result; |
| 88 } | 88 } |
| OLD | NEW |