Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browser-module-sandbox

Package Overview
Dependencies
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-module-sandbox - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

7

index.js

@@ -0,1 +1,3 @@

'use strict';
var inherits = require('inherits')

@@ -19,4 +21,5 @@ var iframe = require('iframe')

this.iframeBody = opts.iframeBody || ""
this.iframeSandbox = opts.iframeSandbox || ""
this.cdn = opts.cdn || window.location.protocol + '//' + window.location.host
this.iframe = iframe({ container: this.container, scrollingDisabled: true })
this.iframe = iframe({ container: this.container, scrollingDisabled: true, sandboxAttributes: this.iframeSandbox })
this.iframeStyle = "<style type='text/css'>" +

@@ -156,3 +159,3 @@ "html, body { margin: 0; padding: 0; border: 0; }\n" +

var body = self.iframeBody + scriptTag
var html = { head: self.iframeHead + self.iframeStyle, body: body, script: script }
var html = { head: self.iframeHead + self.iframeStyle, body: body, script: script, sandboxAttributes: self.iframeSandbox }
if (self.name) html.name = self.name

@@ -159,0 +162,0 @@ self.iframe.setHTML(html)

{
"name": "browser-module-sandbox",
"version": "1.4.3",
"version": "1.4.4",
"description": "uses browserify-cdn to run node code in an iframe",

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

"detective": "^4.0.0",
"iframe": "^0.3.1",
"iframe": "voronianski/iframe",
"inherits": "^2.0.1"

@@ -16,0 +16,0 @@ },

@@ -30,2 +30,3 @@ # browser-module-sandbox

iframeStyle: string for css, gets appended to end of iframeHead,
iframeSandbox: array of capability flag strings,
iframe: iframe instance, default creates a new one inside container

@@ -64,2 +65,2 @@ })

BSD
BSD
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