Socket
Socket
Sign inDemoInstall

iframe

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iframe - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

index.js

@@ -42,3 +42,3 @@ module.exports = function(opts) {

// create a blob for opts.html and set as iframe `src` attribute
var blob = new Blob([opts.html], {type: 'text/html;charset=UTF-8'})
var blob = new Blob([opts.html], { type: 'text/html;charset=UTF-8' })
var targetUrl = URL.createObjectURL(blob)

@@ -45,0 +45,0 @@ tempIframe.src = targetUrl

{
"name": "iframe",
"version": "0.1.0",
"version": "0.1.1",
"description": "higher level api for creating and using iframes in browsers",

@@ -13,3 +13,4 @@ "repository": {

"devDependencies": {
"tape": "~2.3.2"
"tape": "~2.3.2",
"domready": "~0.2.13"
},

@@ -16,0 +17,0 @@ "testling": {

var test = require('tape')
var domready = require('domready')
var iframe = require('./')
test('it adds an iframe to the document by default', function(t) {
t.equal(document.querySelectorAll('iframe').length, 0, 'no frames')
var frame = iframe({ body: 'hello world' })
t.equal(document.querySelectorAll('iframe').length, 1, 'one frame')
t.end()
domready(function () {
t.equal(document.querySelectorAll('iframe').length, 0, 'no frames')
var frame = iframe({ body: 'hello world' })
t.equal(document.querySelectorAll('iframe').length, 1, 'one frame')
t.end()
})
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc