I notice you are using the postMessage API for cross-origin communication. In my application there are other programs implementing this as well, which causes these messages to enter in your event listener (relay.js:28: events.bind(window, 'message', listener)).
In my use case, I'm receiving strings via postMessage, which causes relay.js:29: var data = JSON.parse(event.data) to fail. There should exist origin checking in order to avoid conflicts, e.g:
events.bind(window,'message',functionlistener(event){if(event.origin==='https://api.recurly.com'){/* or whatever property that holds this value */vardata=JSON.parse(event.data);varname=data.recurly_event;varbody=data.recurly_message;varerr=body.error ? errors('api-error',body.error) : null;events.unbind(window,'message',listener);if(name)self.emit(name,err,body);if(frame)document.body.removeChild(frame);}});
The text was updated successfully, but these errors were encountered:
I notice you are using the postMessage API for cross-origin communication. In my application there are other programs implementing this as well, which causes these messages to enter in your event listener (
relay.js:28:events.bind(window, 'message', listener)).In my use case, I'm receiving strings via postMessage, which causes
relay.js:29:var data = JSON.parse(event.data)to fail. There should exist origin checking in order to avoid conflicts, e.g:The text was updated successfully, but these errors were encountered: