mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:37:12 +00:00
Run new MessageEvent constructor instead of initMessageEvent in Firefox.
BUG= R=blois@google.com Review URL: https://codereview.chromium.org//358413003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37843 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
6c4eff32c9
commit
d00d127379
|
@ -18415,6 +18415,11 @@ class MessageEvent extends Event native "MessageEvent" {
|
|||
if (source == null) {
|
||||
source = window;
|
||||
}
|
||||
if (!Device.isIE) {
|
||||
return JS('MessageEvent', 'new MessageEvent(#, {bubbles: #, cancelable: #, data: #, origin: #, lastEventId: #, source: #, ports: #})',
|
||||
type, canBubble, cancelable, data, origin, lastEventId, source,
|
||||
messagePorts);
|
||||
}
|
||||
var event = document._createEvent("MessageEvent");
|
||||
event._initMessageEvent(type, canBubble, cancelable, data, origin,
|
||||
lastEventId, source, messagePorts);
|
||||
|
|
|
@ -400,8 +400,6 @@ speechrecognition_test/supported: Fail
|
|||
websql_test/supported: Fail
|
||||
|
||||
[ $runtime == ff ]
|
||||
messageevent_test: RuntimeError # Issue 15651
|
||||
serialized_script_value_test: RuntimeError # Issue 15651
|
||||
client_rect_test: Fail # Issue 16890
|
||||
|
||||
[ $runtime == ff ]
|
||||
|
|
|
@ -6,7 +6,7 @@ import 'dart:html';
|
|||
main() {
|
||||
useHtmlConfiguration();
|
||||
|
||||
test('MessageEvent.initMessageEvent', () {
|
||||
test('new MessageEvent', () {
|
||||
final event = new MessageEvent('type', cancelable: true, data: 'data',
|
||||
origin: 'origin', lastEventId: 'lastEventId');
|
||||
|
||||
|
|
|
@ -14,6 +14,14 @@ $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
|||
if (source == null) {
|
||||
source = window;
|
||||
}
|
||||
$if DART2JS
|
||||
if (!Device.isIE) { // TODO: This if check should be removed once IE
|
||||
// implements the constructor.
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue