Description
This issue was originally filed by [email protected]
I send a message via postMessage to the window from javascript code and to receive it from the dart code. If I send a string message, dart code can access data field from MessageEvent without any problems. But If I send an object with postMessage, any access to data field causes exception.
JS code:
window.addEventListener('message', function(ev) {
if (ev.data == 'init') {
console.log(arguments);
window.postMessage({some: 'message from js'}, '*');
};
});
Dart code:
window.on.message.add((ev) {
if (ev.data != 'init') {
window.console.log(ev.data);
window.console.log(ev.data.some);
}
});
window.postMessage('init', '*');
Console output:
MessageEvent
Uncaught TypeError: Object #<Object> has no method 'ptr$htmlimpl0a8e4b$$getter'