OpenF2 / F2

Redefining web integration for the financial services community
Apache License 2.0
130 stars 62 forks source link

Cannot pass DOM element references in event data #301

Closed jsphstls closed 2 years ago

jsphstls commented 6 years ago

Attempting to pass a DOM element reference, such as an event target, will result in this error: Uncaught TypeError: 'Converting circular structure to JSON'

This is because all event data is stringified: https://github.com/OpenF2/F2/blob/master/sdk/src/rpc.js#L238

F2 is supposed stringify only if there are actual sockets (iframes) to send to. In this case it is needlessly stringifying.

brianbaker commented 3 years ago

rpc is going away for v2