Side navigation
#13006 closed bug (notabug)
Opened December 05, 2012 10:08PM UTC
Closed December 06, 2012 02:05AM UTC
postMessage events lack data
Reported by: | james@zendesk.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The postMessage API takes two arguments: a message and a targetOrigin. When using the native window.addEventListener, the listener gets an event with the message in the "data" field. When using $(window).on('message'), the data field is blank.
Attachments (0)
Change History (1)
Changed December 06, 2012 02:05AM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
jQuery's
Event
object only normalizes a small set of properties, as documented. If you want raw unprocessed properties, useevent.originalEvent.data
for example. In particular, the.data
property inevent.data
would correspond to anydata
parameter passed in.on(event, data, fn)
.