https://github.com/alexlafroscia/ember-iframe-resizer-modifier
Ember modifier for iframe-resizer
https://github.com/alexlafroscia/ember-iframe-resizer-modifier
emberjs emberjs-addon iframe
Last synced: 4 months ago
JSON representation
Ember modifier for iframe-resizer
- Host: GitHub
- URL: https://github.com/alexlafroscia/ember-iframe-resizer-modifier
- Owner: alexlafroscia
- License: mit
- Created: 2020-07-02T17:26:32.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-31T11:02:59.000Z (about 3 years ago)
- Last Synced: 2025-10-12T00:58:19.429Z (8 months ago)
- Topics: emberjs, emberjs-addon, iframe
- Language: JavaScript
- Homepage:
- Size: 2.9 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ember-iframe-resizer-modifier
Ember modifier for [`iframe-resizer`](https://github.com/davidjbradshaw/iframe-resizer)
## Compatibility
- Ember.js v3.12 or above
- Ember CLI v2.13 or above
- Node.js v10 or above
## Installation
```
ember install ember-iframe-resizer-modifier
```
Note: you application must have a dependency on `ember-auto-import` v2 in order to use this addon as well.
## Usage
This addon provides a modifier that can be used to ensure that an `iframe` in your Ember app is always resized to match the contents of the `iframe`.
In your template, you can use `iframe-resizer` on an `iframe` element like so:
```handlebars
```
Any options that are supported by the `iframeResizer` function can be passed as named arguments to the modifier. Any positional arguments to the modifier are treated as additional objects containing options for the `iframeResizer` function; all of these potential options are merged together before passing them to `iframeResizer`.
### Content Window JS
The JS file to include on the page within the `iframe` is also exposed through this addon. The [`js` directory of the `iframe-resizer` repository](https://github.com/davidjbradshaw/iframe-resizer/tree/master/js) is made available at `/iframe-resizer`. See the [test `iframe.html` file](./tests/dummy/public/iframe.html) for an example.
## Contributing
See the [Contributing](CONTRIBUTING.md) guide for details.
## License
This project is licensed under the [MIT License](LICENSE.md).