mirror of
https://github.com/dart-lang/sdk
synced 2024-09-21 03:13:14 +00:00
Fix MessageEvent.data to convert using structured clone.
BUG= Review URL: https://codereview.chromium.org/1683403005 .
This commit is contained in:
parent
c4602b0c8b
commit
f2fd68c362
|
@ -26122,8 +26122,12 @@ class MessageEvent extends Event {
|
|||
|
||||
@DomName('MessageEvent.data')
|
||||
@DocsEditable()
|
||||
Object get data => wrap_jso(_blink.BlinkMessageEvent.instance.data_Getter_(unwrap_jso(this)));
|
||||
|
||||
// TODO(alanknight): This really should be generated by the
|
||||
// _OutputConversion in the systemnative.py script, but that doesn't
|
||||
// use those conversions right now, so do this as a one-off.
|
||||
dynamic get data => convertNativeToDart_SerializedScriptValue(
|
||||
_blink.BlinkMessageEvent.instance.data_Getter_(unwrap_jso(this)));
|
||||
|
||||
@DomName('MessageEvent.lastEventId')
|
||||
@DocsEditable()
|
||||
@Unstable()
|
||||
|
|
|
@ -21,11 +21,22 @@ $if DART2JS
|
|||
type, canBubble, cancelable, data, origin, lastEventId, source,
|
||||
messagePorts);
|
||||
}
|
||||
$endif
|
||||
$endif
|
||||
var event = document._createEvent("MessageEvent");
|
||||
event._initMessageEvent(type, canBubble, cancelable, data, origin,
|
||||
lastEventId, source, messagePorts);
|
||||
return event;
|
||||
}
|
||||
|
||||
$if DARTIUM
|
||||
// TODO(alanknight): This really should be generated by the
|
||||
// _OutputConversion in the systemnative.py script, but that doesn't
|
||||
// use those conversions right now, so do this as a one-off.
|
||||
@DomName('MessageEvent.data')
|
||||
@DocsEditable()
|
||||
dynamic get data => convertNativeToDart_SerializedScriptValue(
|
||||
_blink.BlinkMessageEvent.instance.data_Getter_(unwrap_jso(this)));
|
||||
$endif
|
||||
|
||||
$!MEMBERS
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue