Remove check that determines if `connectToParent` is running inside iframe
Aaronius opened this issue · 1 comments
When calling connectToParent
, Penpal checks to see if it is running inside an iframe and, if not, throws a NotInIframe
error to make you aware of the problem. While this can be helpful, it causes problems when Penpal is running within a Cypress test. While there's a workaround available by disabling modifyObstructiveCode
in Cypress, that can potentially cause other issues if some other JavaScript is attempting to framebust and Cypress actually needs to modify that obstructive code.
While the check Penpal provides can be helpful, developers are probably unlikely to call connectToParent
outside of an iframe and they would probably notice the problem pretty easily without the check in place.
To avoid this problems with Cypress entirely and to avoid yet another configuration option, I propose removing the check from Penpal entirely. This will require a major version, however.
This was released in v6.