Comparing version 0.0.1 to 0.0.2
@@ -6,2 +6,4 @@ module.exports = function(opts) { | ||
function IFrame(opts) { | ||
if (!opts) opts = {} | ||
this.opts = opts | ||
this.container = opts.container || document.body | ||
@@ -28,4 +30,6 @@ this.setHTML(opts) | ||
opts = this.parseHTMLOptions(opts) | ||
if (!opts.html) return | ||
this.remove() | ||
this.iframe = document.createElement('iframe') | ||
this.iframe.setAttribute('scrolling', this.opts.scrollingDisabled ? 'no' : 'yes') | ||
this.iframe.style.width = '100%' | ||
@@ -32,0 +36,0 @@ this.iframe.style.height = '100%' |
{ | ||
"name": "iframe", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "higher level api for creating and using iframes in browsers", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -33,2 +33,3 @@ # iframe | ||
container: (constructor only) dom element to append iframe to, default = document.body | ||
scrollingDisabled: (constructor only) boolean for the iframe scrolling attr | ||
} | ||
@@ -35,0 +36,0 @@ ``` |
2596
37
42