Index: tools/dom/templates/html/impl/impl_MessageEvent.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate b/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate |
index 8a16f106de30936f6fb745a34260478fcdbdd94e..621d28a0a35264ff9ad097f51bc98eb748ae0fab 100644 |
--- a/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate |
@@ -14,6 +14,13 @@ $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
if (source == null) { |
source = window; |
} |
+$if DART2JS |
+ if (!Device.isIE) { |
+ return JS('MessageEvent', 'new MessageEvent(#, {bubbles: #, cancelable: #, data: #, origin: #, lastEventId: #, source: #, ports: #})', |
+ type, canBubble, cancelable, data, origin, lastEventId, source, |
+ messagePorts); |
+ } |
+$endif |
var event = document._createEvent("MessageEvent"); |
event._initMessageEvent(type, canBubble, cancelable, data, origin, |
lastEventId, source, messagePorts); |