Skip to content

Commit

Permalink
[CHORE] Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemick committed Aug 17, 2024
1 parent c5333e8 commit 9036bed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html linguist-vendored
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

A modern, lightweight library for resizing iframes dynamically. It is shipped under the MIT license, making it usable in commercial projects.
A modern, lightweight alternative for resizing iframes dynamically. It is shipped under the MIT license, making it usable in commercial projects.

If you found this plugin helpful, please consider starring the repository!

Expand All @@ -21,15 +21,24 @@ If you found this plugin helpful, please consider starring the repository!
You can found a working example [here](https://codesandbox.io/p/sandbox/open-iframe-resize-browser-m655zt)

### Package
Note you can also install the package through npm:
Note you can also install the core package through [npm](https://www.npmjs.com/package/@open-iframe-resizer/core):
```bash
npm install @open-iframe-resizer/core
```

### React
A React component is also available:
```bash
npm install @open-iframe-resizer/react
```

## Notes

### Retro-compatibility
I decided to replicate the API from the well-known iframe-resizer library, as it may facilitate migration to this project (you only need to change the script).
### Comparison with iframe-resizer
This library is very good, but it has changed its license, so it is no longer usable in closed-source projects for free.
I decided to replicate the API, as it may facilitate migration to this project (you only need to change the script).

Some features from this library are missing, but they could be implemented in future versions.

### Resize cross-origin iframes
To resize iframes from a different origin, you also need to load the script on your child page to enable messaging between the two windows (you do not need to call the initialize function in the child; loading the module is sufficient).
Expand Down

0 comments on commit 9036bed

Please sign in to comment.