You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
sgarfinkel
changed the title
Deeply wrap nested functions in callbacks
Deeply wrap nested functions inside objects in callbacks
Jun 10, 2024
It can be a useful feature, but need to think a couple of things through:
Any function in the object will intrinsically be turned into an asynchronous method.
But if we restrict the callbacks to not returning anything (such is the case in the current callback implementation), then it really doesn't matter.
Would you be interested in opening a PR for this feature?
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.
The text was updated successfully, but these errors were encountered: