Skip to content

Cannot pass DOM element references in event data #301

@jsphstls

Description

@jsphstls

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions