Feature suggestion: parent/child connection timeout should reject promiseSee original GitHub issue
As far as I can see if I run child sand-alone and I make an attempt to connect to the parent the promise stays pending indefinitely.
It’s super-easy to detect “just” running stand-alone in child (by checking if
window.parent !== window), but it becomes harder if connection was not properly established (for any reason in fact)
Currently I use
Promise.race for that but it seems like a reasonable thing to have it baked in.
- Created 5 years ago
- Comments:18 (12 by maintainers)
Top GitHub Comments
Alright, I’ve published this on the
next dist-tag as
3.0.0-alpha.3. You can try it out via
npm install penpal@next or
npm install firstname.lastname@example.org.
Give it a shot and let me know how it works for you. You can find the
timeout option in the readme here: https://github.com/Aaronius/penpal/tree/v3
Published in 3.0.0.