Help test v5!
See original GitHub issueGood news! Version 5 is about ready to ship and I could use your help testing it out.
To install v5, run npm install penpal@next
. For the updated readme, see https://github.com/Aaronius/penpal/blob/5.x/README.md
Breaking Changes
Importing Modules
The only breaking changes are in how connectToParent
, connectToChild
, and error codes are imported. Penpal no longer ships with ES5. The ES6 code is set up in such a way that your bundler of choice should properly tree shake unused code.
New Features
TypeScript
Penpal is now built using TypeScript, so if you’re using TypeScript, you now get types for free!
Regex Support for parentOrigin
When using connectToParent
, you can now specify a regular expression for parentOrigin
. By providing a regular expression, you can now load the iframe onto multiple, different domains while ensuring that communication is secured to those domains only.
While this was not a breaking change, it did require significant changes to the handshake process as described in https://github.com/Aaronius/penpal/pull/32#issuecomment-613198637 and due to the higher risk of the change I decided to include it with other breaking changes in v5 rather than adding it to v4.
Comment Below
If you have feedback, please post a comment below. Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (7 by maintainers)
Top GitHub Comments
Sorry was a public holiday here on Friday and I didn’t check my emails. I had a brief look over the public API and couldn’t see any issues.
Thank you for your continued support of this library, we migrated away from postmate to this as they seem to have abandoned it.
Barring any issues, which there don’t seem to be, I was planning on publishing v5 before the end of the week (end of May 10).