Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(623)

Side by Side Diff: tools/dom/src/Isolates.dart

Issue 12025027: Cleaning up event constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698