Skip to content

Deeply wrap nested functions inside objects in callbacks #64

Open
@sgarfinkel

Description

@sgarfinkel

Is your feature request related to a problem? Please describe.
Basically what this says on the tin. I am using post-me for interoperating with React components on within the iframe, and it's particularly convenient in this case to pass a single object-type argument with values. Unfortunately, the existing implementation does not recurse into object arguments (https://github.com/alesgenova/post-me/blob/main/packages/core/src/handles.ts#L224-L231C10). I would love if this could be implemented as it should be fairly straightforward.

Describe the solution you'd like
Objects should be traversed and any property of type function should be wrapped.

Describe alternatives you've considered
All callbacks need to be moved out of the object into the top-level function call, which is not ideal.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions