dollarshaveclub / postmate

📭 A powerful, simple, promise-based postMessage library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

maxHandshakeRequests is not configurable

marlon-tucker opened this issue · comments

What Is the issue?

maxHandshakeRequests is defined internally and can't be configured.

Provide issue context below using code examples, images, or links

export const maxHandshakeRequests = 5

Having this be configurable, either by setting a static global variable (similar to debug) or passing a config option object into the Postmate constructor would enable us to accommodate IE11 being too slow to respond to the handshake in time. If this happens Postmate fails silently.

There is a pending PR which also fixes this by rejecting the handshake promise if this occurs, but having the maxHandshakeRequests be configurable would also be a way to adjust this behavior.