Socket
Socket
Sign inDemoInstall

browser-module-sandbox

Package Overview
Dependencies
Maintainers
1
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.3.7 to 1.3.9

8

index.js

@@ -15,2 +15,3 @@ var inherits = require('inherits')

if (!opts) opts = {}
this.name = opts.name
this.container = opts.container || document.body

@@ -28,2 +29,4 @@ this.iframeHead = opts.iframeHead || ""

inherits(Sandbox, events.EventEmitter)
Sandbox.prototype.bundle = function(entry, preferredVersions) {

@@ -105,5 +108,6 @@ if (!preferredVersions) preferredVersions = {}

'<script type="text/javascript" src="data:text/javascript;charset=UTF-8,'
+ encodeURIComponent('setTimeout(function(){' + script + '}, 0)')
+ encodeURIComponent('setTimeout(function(){\n;' + script + '\n;}, 0)')
+ '"></script>'
var html = { head: self.iframeHead + self.iframeStyle, body: body, script: script }
if (self.name) html.name = self.name
self.iframe.setHTML(html)

@@ -113,3 +117,1 @@ self.emit('bundleEnd', html)

}
inherits(Sandbox, events.EventEmitter)
{
"name": "browser-module-sandbox",
"version": "1.3.7",
"version": "1.3.9",
"description": "uses browserify-cdn to run node code in an iframe",

@@ -10,7 +10,7 @@ "repository": {

"dependencies": {
"iframe": "~0.0.2",
"inherits": "~1.0.0",
"detective": "~2.1.2",
"browser-module-cache": "~0.1.3",
"browser-request": "~0.3.1"
"browser-request": "~0.3.3",
"detective": "^4.0.0",
"iframe": "^0.3.1",
"inherits": "^2.0.1"
},

@@ -17,0 +17,0 @@ "bugs": {

@@ -15,3 +15,3 @@ # browser-module-sandbox

```javascript
var sandbox = require('browser-module-sandbox')
var Sandbox = require('browser-module-sandbox')
```

@@ -24,3 +24,4 @@

```javascript
var sandbox = sandbox({
var sandbox = Sandbox({
name: iframe name attribute,
cdn: 'http://localhost:8000', // browserify-cdn API endpoint, defaults to the current browser domain root,

@@ -27,0 +28,0 @@ container: dom element where the iframe should be appended,

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