load-iframe
Version:
Load an iframe by appending an iframe tag to the DOM.
57 lines (39 loc) • 1.22 kB
Markdown
Load an iframe by appending an iframe tag to the DOM.
```sh
$ npm install load-iframe
$ component install segmentio/load-iframe
```
```js
var load = require('load-iframe');
load('//www.google.com');
```
Loads Google in the iframe.
```js
var load = require('load-iframe');
load({
http : 'http://www.google.com',
https : 'https://ssl.google.com'
});
```
Loads in the right URL depending on the protocol.
Load the given iframe either by passing a `src` string, or
an `options` object:
```js
{
src: '//example.com', // same as `src` string
http: 'http://example.com', // `src` to load if the protocol is `http:`
https: 'https://ssl.example.com' // `src` to load if the protocol is `https:`
}
```
Update the Package.json version to version you want to publish and then as soon as your changed merged to master and your head/latest commit message starts with "Publish" , it will publish the mentioned version
MIT
<!--
[]: https://circleci.com/gh/segmentio/load-iframe
[]: https://circleci.com/gh/segmentio/load-iframe.svg?style=svg -->