Skip to content

Calls should reject promise if target window is unresponsive #61

@mrcnski

Description

@mrcnski

Is your feature request related to a problem? Please describe.
If I call A() on a child window, the target window may become unresponsive while running A() and the caller is stuck waiting on the result of A().

Describe the solution you'd like
I'd like for the call to fail after a set amount of unresponsive time (e.g. 2 seconds).

Describe alternatives you've considered
I can manually implement a simple ping() method on the target and have the caller ping it periodically to check if the target window is still responsive. This is not ideal because we have a complex architecture with many target windows and we'd have to implement ping() on all of them. I think changes in post-me are required for this, I can do it myself if you don't have time but any guidance is appreciated.

We have the target windows catching errors and onunload events and those are handled properly, but there are situations in which those aren't triggered.

Additional context
Related but different is a timeout parameter for calls. We don't want calls to timeout for our specific use case because we expect some calls to take an indefinite amount of time. We just want to check that the window continues to be responsive.

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