Skip to content

Handle multiple pending spawns to/from the same app #58

@wejendorp

Description

@wejendorp

Describe the bug
Calling app.spawn() multiple times creates multiple requests and iframes via the hub.

To Reproduce
Code or link to code to reproduce the behavior:

const app = ts.io();
app.spawn('Tradeshift.MyApp');
app.spawn('Tradeshift.MyApp');
app.spawn('Tradeshift.MyApp');

3 separate iframes w/ MyApp will be created. (UX issue)

Callback behavior is unclear. (integrity issue)

Expected behavior
A clear and concise description of what you expected to happen.

Subsequent spawns should error or (if possible) invalidate the existing request.
Similarly to xhr cancellation.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions