Load an iframe by appending an iframe tag to the DOM.
$ npm install load-iframe
$ component install segmentio/load-iframe
var load = require('load-iframe');
load('//www.google.com');
Loads Google in the iframe.
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:
{
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:`
}
To publish a new version of load-iframe
-
Update package.json with new major|minor|patch version and raise a PR. Ensure that you are not trying to publish an existing version by verifying the published versions in NPM.
-
Ensure that PR title or the Github commit message starts with
Publish
. This is the trigger for Publish Github Action. -
Merge the PR. Wait for the Github action to finish and then check NPM for the new version.
MIT