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
Eventobject only normalizes a small set of properties, as documented. If you want raw unprocessed properties, useevent.originalEvent.datafor example. In particular, the.dataproperty inevent.datawould correspond to anydataparameter passed in.on(event, data, fn).