When I use jQuery event listener to handle message event, like below:
$(window).on(\'message\', function(e) { var data = e.data; // data = undefined });
jQuery might be preprocessing the event's data property, and this operation may not properly support the message event (yet).
data
message
Try using the originalEvent property to fetch your data:
originalEvent
$(window).on("message", function(e) { var data = e.originalEvent.data; // Should work. });