├── iframer.jpg ├── package.json ├── LICENSE ├── README.md └── dist └── iframer.js /iframer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmysla/IFRAMEr/HEAD/iframer.jpg -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iframer", 3 | "version": "1.0.0", 4 | "description": "IFRAMEr makes your web components portable and your life easier", 5 | "main": "./dist/iframer.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vmysla/IFRAMEr.git" 9 | }, 10 | "keywords": [ 11 | "iframe", 12 | "widget", 13 | "frontend", 14 | "portable", 15 | "wrapper", 16 | "cross-platform" 17 | ], 18 | "author": "Vlad Mysla", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/vmysla/IFRAMEr/issues" 22 | }, 23 | "homepage": "https://github.com/vmysla/IFRAMEr#readme" 24 | } 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Vlad Mysla 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | IFRAMEr makes your components portable and your life easier. 2 | 3 | If you look for a simple approach which helps creating reusable web components - IFRAMEr might be exactly what you need. This is a small JavaScript function that wraps your `html` markup with all `styles` and `scripts` you need for its work - into dynamically created `iframe` element, so page can't suddenly break the original design of your component. 4 | 5 | ## Overview 6 | 7 | Enjoy with the demo on JsFiddle first: https://jsfiddle.net/vmysla/7rhgoeuq/3/embedded/result/ 8 | 9 |  10 | 11 | Demo: https://jsfiddle.net/vmysla/7rhgoeuq/3/embedded/result/ 12 | 13 | IFRAMEr has no dependencies. 14 | Total size for minified version of the script is 495 bytes gzipped (798 bytes uncompressed). 15 | You can extend and customize it by adding own tasks. 16 | 17 | Feel free to fork: `git clone https://github.com/vmysla/IFRAMEr` 18 | 19 | ## Get started 20 | 21 | Widget is any web component which is wrapped into IFRAME for its wide distribution in the web. 22 | You can create widgets from any frontend element you have on the page: 23 | 24 | ``` html 25 | ... 26 |