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

Unified Diff: lib/dom/templates/html/dartium/html_dartium.darttemplate

Issue 10694134: Reuse _dispatchEvent for sync message sending. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/templates/html/dartium/html_dartium.darttemplate
diff --git a/lib/dom/templates/html/dartium/html_dartium.darttemplate b/lib/dom/templates/html/dartium/html_dartium.darttemplate
index f9e4f45bc5f68f33fcb9e1b09968f4c729b9a35f..f7b9120b14a5686fa67da7989c50f260391276f3 100644
--- a/lib/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/lib/dom/templates/html/dartium/html_dartium.darttemplate
@@ -82,11 +82,8 @@ _callPortSync(num id, var message) {
}, false);
_callPortInitialized = true;
}
- var data = JSON.stringify({ 'id': id, 'message': message });
- var event = document.$dom_createEvent('TextEvent');
- event.initTextEvent('js-sync-message', false, false, window, data);
assert(_callPortLastResult == null);
- window.$dom_dispatchEvent(event);
+ _dispatchEvent('js-sync-message', {'id': id, 'message': message});
var result = _callPortLastResult;
_callPortLastResult = null;
return result;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698