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 part of html; | 5 part of html; |
6 | 6 |
7 _serialize(var message) { | 7 _serialize(var message) { |
8 return new _JsSerializer().traverse(message); | 8 return new _JsSerializer().traverse(message); |
9 } | 9 } |
10 | 10 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 return _portMap[portId].toSendPort(); | 210 return _portMap[portId].toSendPort(); |
211 } else { | 211 } else { |
212 return new _RemoteSendPortSync(isolateId, portId); | 212 return new _RemoteSendPortSync(isolateId, portId); |
213 } | 213 } |
214 } | 214 } |
215 } | 215 } |
216 | 216 |
217 get _isolateId => ReceivePortSync._isolateId; | 217 get _isolateId => ReceivePortSync._isolateId; |
218 | 218 |
219 void _dispatchEvent(String receiver, var message) { | 219 void _dispatchEvent(String receiver, var message) { |
220 var event = new CustomEvent(receiver, false, false, json.stringify(message)); | 220 var event = new CustomEvent(receiver, canBubble: false, cancelable:false, |
| 221 detail: json.stringify(message)); |
221 window.$dom_dispatchEvent(event); | 222 window.$dom_dispatchEvent(event); |
222 } | 223 } |
223 | 224 |
224 String _getPortSyncEventData(CustomEvent event) => event.detail; | 225 String _getPortSyncEventData(CustomEvent event) => event.detail; |
OLD | NEW |